public class NonGenericList extends Object implements com.aspose.ms.System.Collections.IList
Non generic list of objects
Constructor and Description |
---|
NonGenericList(com.aspose.ms.System.Collections.Generic.List list)
Initializes a new instance of the
NonGenericList class. |
Modifier and Type | Method and Description |
---|---|
int |
addItem(Object value)
Adds an item to the
System.Collections.IList . |
void |
clear()
Removes all items from the
System.Collections.IList . |
boolean |
contains(Object value)
Determines whether the
System.Collections.IList contains a specific value. |
void |
copyTo(com.aspose.ms.System.Array array,
int index)
Copies the elements of the
System.Collections.ICollection to an System.Array , starting at a particular System.Array index. |
Object |
get_Item(int index)
Gets the element at the specified index.
|
Object |
getSyncRoot()
Gets an object that can be used to synchronize access to the
System.Collections.ICollection . |
int |
indexOf(Object value)
Determines the index of a specific item in the
System.Collections.IList . |
void |
insertItem(int index,
Object value)
Inserts an item to the
System.Collections.IList at the specified index. |
boolean |
isFixedSize()
Gets a value indicating whether the
System.Collections.IList has a fixed size. |
boolean |
isReadOnly()
Gets a value indicating whether the
System.Collections.IList is read-only. |
boolean |
isSynchronized()
Gets a value indicating whether access to the
System.Collections.ICollection is synchronized (thread safe). |
com.aspose.ms.System.Collections.IEnumerator |
iterator()
Returns an enumerator that iterates through a collection.
|
void |
removeAt(int index)
Removes the
System.Collections.IList item at the specified index. |
void |
removeItem(Object value)
Removes the first occurrence of a specific object from the
System.Collections.IList . |
void |
set_Item(int index,
Object value)
Sets the element at the specified index.
|
int |
size()
Gets the number of elements contained in the
System.Collections.ICollection . |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public NonGenericList(com.aspose.ms.System.Collections.Generic.List list)
Initializes a new instance of the NonGenericList
class.
list
- The list - container of objects.public int addItem(Object value)
Adds an item to the System.Collections.IList
.
addItem
in interface com.aspose.ms.System.Collections.IList
value
- The System.Object
to add to the System.Collections.IList
.public void clear()
Removes all items from the System.Collections.IList
.
clear
in interface com.aspose.ms.System.Collections.IList
public boolean contains(Object value)
Determines whether the System.Collections.IList
contains a specific value.
contains
in interface com.aspose.ms.System.Collections.IList
value
- The System.Object
to locate in the System.Collections.IList
.System.Object
is found in the System.Collections.IList
; otherwise, false.public int indexOf(Object value)
Determines the index of a specific item in the System.Collections.IList
.
indexOf
in interface com.aspose.ms.System.Collections.IList
value
- The System.Object
to locate in the System.Collections.IList
.value
if found in the list; otherwise, -1.public void insertItem(int index, Object value)
Inserts an item to the System.Collections.IList
at the specified index.
insertItem
in interface com.aspose.ms.System.Collections.IList
index
- The zero-based index at which value
should be inserted.value
- The System.Object
to insert into the System.Collections.IList
.public boolean isFixedSize()
Gets a value indicating whether the System.Collections.IList
has a fixed size.
isFixedSize
in interface com.aspose.ms.System.Collections.IList
public boolean isReadOnly()
Gets a value indicating whether the System.Collections.IList
is read-only.
isReadOnly
in interface com.aspose.ms.System.Collections.IList
public Object get_Item(int index)
Gets the element at the specified index.
get_Item
in interface com.aspose.ms.System.Collections.IList
index
- The index.public void set_Item(int index, Object value)
Sets the element at the specified index.
set_Item
in interface com.aspose.ms.System.Collections.IList
index
- The index.public void removeItem(Object value)
Removes the first occurrence of a specific object from the System.Collections.IList
.
removeItem
in interface com.aspose.ms.System.Collections.IList
value
- The System.Object
to remove from the System.Collections.IList
.public void removeAt(int index)
Removes the System.Collections.IList
item at the specified index.
removeAt
in interface com.aspose.ms.System.Collections.IList
index
- The zero-based index of the item to remove.public void copyTo(com.aspose.ms.System.Array array, int index)
Copies the elements of the System.Collections.ICollection
to an System.Array
, starting at a particular System.Array
index.
copyTo
in interface com.aspose.ms.System.Collections.ICollection
array
- The one-dimensional System.Array
that is the destination of the elements copied from System.Collections.ICollection
. The System.Array
must have zero-based indexing.index
- The zero-based index in array
at which copying begins.public int size()
Gets the number of elements contained in the System.Collections.ICollection
.
size
in interface com.aspose.ms.System.Collections.ICollection
public boolean isSynchronized()
Gets a value indicating whether access to the System.Collections.ICollection
is synchronized (thread safe).
isSynchronized
in interface com.aspose.ms.System.Collections.ICollection
public Object getSyncRoot()
Gets an object that can be used to synchronize access to the System.Collections.ICollection
.
getSyncRoot
in interface com.aspose.ms.System.Collections.ICollection
public com.aspose.ms.System.Collections.IEnumerator iterator()
Returns an enumerator that iterates through a collection.