com.aspose.pdf.boundscheckablelist

Inheritance: java.lang.Object, com.aspose.pdf.boundscheckablelist.BoundsCheckableList

All Implemented Interfaces: com.aspose.ms.System.Collections.Generic.IGenericCollection, com.aspose.ms.System.Collections.Generic.IGenericEnumerable, com.aspose.ms.System.Collections.Generic.IGenericList, com.aspose.ms.System.Collections.IEnumerable, Iterable

public class BoundsCheckableList<T extends IBoundsCheckableItem > extends Object implements com.aspose.ms.System.Collections.Generic.IGenericList<T>

Represents BoundsCheckableList - wrapper around System.Collections.Generic.List.

Constructors

ConstructorDescription
BoundsCheckableListInitializes a new instance of the BoundsCheckableList class.
BoundsCheckableListInitializes a new instance of the BoundsCheckableList class.

Methods

MethodDescription
addItemAdds an object to the end of the System.Collections.Generic.List depending on “boundsCheckMode” parameter.
clearRemoves all elements from the System.Collections.Generic.List.
containsItemDetermines whether an element is in the System.Collections.Generic.List.
copyToTArrayCopies the entire System.Collections.Generic.List to a compatible one-dimensional array, starting at the specified index of the target array.
get_ItemGets or sets paragraph from or to collection.
indexOfItemSearches for the specified object and returns the zero-based index of the first occurrence within the entire System.Collections.Generic.List.
insertItemInserts an element into the System.Collections.Generic.List at the specified index.
isReadOnlyGets the value indicating if collection is readonly.
iteratorReturns an enumerator that iterates through the System.Collections.Generic.List.
removeAtRemoves the element at the specified index of the System.Collections.Generic.List.
removeItemRemoves the first occurrence of a specific object from the System.Collections.Generic.List.
set_ItemGets or sets paragraph from or to collection.
sizeGets the number of elements contained in the System.Collections.Generic.List.
updateBoundsCheckModeUpdates boundsCheckMode parameter for initialized collection.
updateBoundsCheckModeUpdates boundsCheckMode parameter for initialized collection.

BoundsCheckableList

public BoundsCheckableList()

Initializes a new instance of the BoundsCheckableList class.

BoundsCheckableList

public BoundsCheckableList(int boundsCheckMode, double containerWidth, double containerHeight)

Initializes a new instance of the BoundsCheckableList class.

Parameters:

ParameterTypeDescription
boundsCheckModeThe bounds cCheck mode.
containerWidthThe container width.
containerHeightThe container height.

addItem

public final void addItem( T item)

Adds an object to the end of the System.Collections.Generic.List depending on “boundsCheckMode” parameter.

Parameters:

ParameterTypeDescription
itemThe object to be added to the end of the System.Collections.Generic.List. The value can be “null” for reference types.

clear

public final void clear()

Removes all elements from the System.Collections.Generic.List.

containsItem

public final boolean containsItem( T item)

Determines whether an element is in the System.Collections.Generic.List.

Parameters:

ParameterTypeDescription
itemThe object to locate in the System.Collections.Generic.List. The value can be null for reference types.

Returns: true if itemitem is found in the System.Collections.Generic.List; otherwise, false.

copyToTArray

public final void copyToTArray( T [] array, int arrayIndex)

Copies the entire System.Collections.Generic.List to a compatible one-dimensional array, starting at the specified index of the target array.

Parameters:

ParameterTypeDescription
arrayThe one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.List. The System.Array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.

get_Item

public final T get_Item(int index)

Gets or sets paragraph from or to collection.

Parameters:

ParameterTypeDescription
indexThe paragraph index.

Returns: the element at the specified index.

indexOfItem

public final int indexOfItem( T item)

Searches for the specified object and returns the zero-based index of the first occurrence within the entire System.Collections.Generic.List.

Parameters:

ParameterTypeDescription
itemThe object to locate in the System.Collections.Generic.List. The value can be null for reference types.

Returns: The zero-based index of the first occurrence of itemitem within the entire System.Collections.Generic.List, if found; otherwise, –1.

insertItem

public final void insertItem(int index, T item)

Inserts an element into the System.Collections.Generic.List at the specified index.

Parameters:

ParameterTypeDescription
indexThe zero-based index at which item should be inserted.
itemThe object to insert. The value can be null for reference types.

isReadOnly

public final boolean isReadOnly()

Gets the value indicating if collection is readonly.

iterator

public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator< T > iterator()

Returns an enumerator that iterates through the System.Collections.Generic.List.

Returns: A Enumerator for the System.Collections.Generic.List.

removeAt

public final void removeAt(int index)

Removes the element at the specified index of the System.Collections.Generic.List.

Parameters:

ParameterTypeDescription
indexThe zero-based index of the element to remove.

removeItem

public final boolean removeItem( T item)

Removes the first occurrence of a specific object from the System.Collections.Generic.List.

Parameters:

ParameterTypeDescription
itemThe object to remove from the System.Collections.Generic.List. The value can be null for reference types.

Returns: true if itemitem is successfully removed; otherwise, false. This method also returns false if itemitem was not found in the System.Collections.Generic.List.

set_Item

public final void set_Item(int index, T value)

Gets or sets paragraph from or to collection.

Parameters:

ParameterTypeDescription
indexThe paragraph index.

size

public final int size()

Gets the number of elements contained in the System.Collections.Generic.List.

Returns: The number of elements contained in the System.Collections.Generic.List.

updateBoundsCheckMode

public final void updateBoundsCheckMode(int boundsCheckMode)

Updates boundsCheckMode parameter for initialized collection.

Parameters:

ParameterTypeDescription
boundsCheckModeThe bounds check mode.

updateBoundsCheckMode

public final void updateBoundsCheckMode(int boundsCheckMode, double containerWidth, double containerHeight)

Updates boundsCheckMode parameter for initialized collection.

Parameters:

ParameterTypeDescription
boundsCheckModeThe bounds check mode.
containerWidthThe container width.
containerHeightThe container height.