NonGenericList

All Implemented Interfaces: com.aspose.ms.System.Collections.IList

Non generic list of objects

Constructors

ConstructorDescription
NonGenericList(com.aspose.ms.System.Collections.Generic.List list)Initializes a new instance of the NonGenericList class.

Methods

MethodDescription
addItem(Object value)Adds an item to the T:System.Collections.IList .
clear()Removes all items from the T:System.Collections.IList .
contains(Object value)Determines whether the T:System.Collections.IList contains a specific value.
indexOf(Object value)Determines the index of a specific item in the T:System.Collections.IList .
insertItem(int index, Object value)Inserts an item to the T:System.Collections.IList at the specified index.
isFixedSize()Gets a value indicating whether the T:System.Collections.IList has a fixed size.
isReadOnly()Gets a value indicating whether the T:System.Collections.IList is read-only.
get_Item(int index)Gets or sets the element at the specified index.
set_Item(int index, Object value)Gets or sets the element at the specified index.
removeItem(Object value)Removes the first occurrence of a specific object from the T:System.Collections.IList .
removeAt(int index)Removes the T:System.Collections.IList item at the specified index.
copyTo(com.aspose.ms.System.Array array, int index)Copies the elements of the T:System.Collections.ICollection to an T:System.Array , starting at a particular T:System.Array index.
size()Gets the number of elements contained in the T:System.Collections.ICollection .
isSynchronized()Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe).
getSyncRoot()Gets an object that can be used to synchronize access to the T:System.Collections.ICollection .
iterator()Returns an enumerator that iterates through a collection.

NonGenericList(com.aspose.ms.System.Collections.Generic.List list)

public NonGenericList(com.aspose.ms.System.Collections.Generic.List list)

Initializes a new instance of the NonGenericList class.

Parameters:

ParameterTypeDescription
listcom.aspose.ms.System.Collections.Generic.ListThe list - container of objects.

addItem(Object value)

public int addItem(Object value)

Adds an item to the T:System.Collections.IList .

Parameters:

ParameterTypeDescription
valueObjectThe T:System.Object to add to the T:System.Collections.IList .

Returns: int - The position into which the new element was inserted.

clear()

public void clear()

Removes all items from the T:System.Collections.IList .

contains(Object value)

public boolean contains(Object value)

Determines whether the T:System.Collections.IList contains a specific value.

Parameters:

ParameterTypeDescription
valueObjectThe T:System.Object to locate in the T:System.Collections.IList .

Returns: boolean - true if the T:System.Object is found in the T:System.Collections.IList ; otherwise, false.

indexOf(Object value)

public int indexOf(Object value)

Determines the index of a specific item in the T:System.Collections.IList .

Parameters:

ParameterTypeDescription
valueObjectThe T:System.Object to locate in the T:System.Collections.IList .

Returns: int - The index of value if found in the list; otherwise, -1.

insertItem(int index, Object value)

public void insertItem(int index, Object value)

Inserts an item to the T:System.Collections.IList at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
valueObjectThe T:System.Object to insert into the T:System.Collections.IList .

isFixedSize()

public boolean isFixedSize()

Gets a value indicating whether the T:System.Collections.IList has a fixed size.

Returns: boolean

isReadOnly()

public boolean isReadOnly()

Gets a value indicating whether the T:System.Collections.IList is read-only.

Returns: boolean

get_Item(int index)

public Object get_Item(int index)

Gets or sets the element at the specified index.

Parameters:

ParameterTypeDescription
indexintThe index.

Returns: Object - Object.

set_Item(int index, Object value)

public void set_Item(int index, Object value)

Gets or sets the element at the specified index.

Parameters:

ParameterTypeDescription
indexintThe index.

removeItem(Object value)

public void removeItem(Object value)

Removes the first occurrence of a specific object from the T:System.Collections.IList .

Parameters:

ParameterTypeDescription
valueObjectThe T:System.Object to remove from the T:System.Collections.IList .

removeAt(int index)

public void removeAt(int index)

Removes the T:System.Collections.IList item at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index of the item to remove.

copyTo(com.aspose.ms.System.Array array, int index)

public void copyTo(com.aspose.ms.System.Array array, int index)

Copies the elements of the T:System.Collections.ICollection to an T:System.Array , starting at a particular T:System.Array index.

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.ArrayThe one-dimensional T:System.Array that is the destination of the elements copied from T:System.Collections.ICollection . The T:System.Array must have zero-based indexing.
indexintThe zero-based index in array at which copying begins.

size()

public int size()

Gets the number of elements contained in the T:System.Collections.ICollection .

Returns: int

isSynchronized()

public boolean isSynchronized()

Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe).

Returns: boolean

getSyncRoot()

public Object getSyncRoot()

Gets an object that can be used to synchronize access to the T:System.Collections.ICollection .

Returns: Object

iterator()

public com.aspose.ms.System.Collections.IEnumerator iterator()

Returns an enumerator that iterates through a collection.

Returns: com.aspose.ms.System.Collections.IEnumerator - An T:System.Collections.IEnumerator object that can be used to iterate through the collection.