PortionCollection

Inheritance: java.lang.Object, com.aspose.slides.DomObject

All Implemented Interfaces: com.aspose.slides.IPortionCollection

public final class PortionCollection extends DomObject<Paragraph> implements IPortionCollection

Represents a collection of portions.

Methods

MethodDescription
getCount()Gets the number of elements actually contained in the collection.
isReadOnly()Gets a value indicating whether the IGenericCollection is read-only.
get_Item(int index)Gets the element at the specified index.
set_Item(int index, IPortion value)Gets the element at the specified index.
add(IPortion value)Adds a Portion to the end of collection.
indexOf(IPortion item)Determines the index of a specific item in the List.
insert(int index, IPortion value)Inserts a Portion into the collection at the specified index.
clear()Removes all elements from the collection.
contains(IPortion item)Determines whether the IGenericCollection contains a specific value.
copyTo(IPortion[] array, int arrayIndex)Copies the elements of the IGenericCollection to an Array, starting at a particular Array index.
remove(IPortion item)Removes the first occurrence of a specific object from the IGenericCollection.
removeAt(int index)Removes the element at the specified index of the collection.
iterator()Returns an enumerator that iterates through the collection.
iteratorJava()Returns a java iterator for the entire collection.

getCount()

public final int getCount()

Gets the number of elements actually contained in the collection. Read-only int.

Returns: int

isReadOnly()

public final boolean isReadOnly()

Gets a value indicating whether the IGenericCollection is read-only. Read-only boolean.

Returns: boolean - true if the IGenericCollection is read-only; otherwise, false.

get_Item(int index)

public final IPortion get_Item(int index)

Gets the element at the specified index.

Parameters:

ParameterTypeDescription
indexint

Returns: IPortion

set_Item(int index, IPortion value)

public final void set_Item(int index, IPortion value)

Gets the element at the specified index.

Parameters:

ParameterTypeDescription
indexint
valueIPortion

add(IPortion value)

public final void add(IPortion value)

Adds a Portion to the end of collection.

Parameters:

ParameterTypeDescription
valueIPortionThe Portion to be added to the end of the collection.

indexOf(IPortion item)

public final int indexOf(IPortion item)

Determines the index of a specific item in the List.

Parameters:

ParameterTypeDescription
itemIPortionThe object to locate in the List.

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

insert(int index, IPortion value)

public final void insert(int index, IPortion value)

Inserts a Portion into the collection at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero-based index at which Portion should be inserted.
valueIPortionThe Portion to insert.

clear()

public final void clear()

Removes all elements from the collection.

contains(IPortion item)

public final boolean contains(IPortion item)

Determines whether the IGenericCollection contains a specific value.

Parameters:

ParameterTypeDescription
itemIPortionThe object to locate in the IGenericCollection.

Returns: boolean - true if item is found in the IGenericCollection; otherwise, false.

copyTo(IPortion[] array, int arrayIndex)

public final void copyTo(IPortion[] array, int arrayIndex)

Copies the elements of the IGenericCollection to an Array, starting at a particular Array index.

Parameters:

ParameterTypeDescription
arrayIPortion[]The one-dimensional Array that is the destination of the elements copied from IGenericCollection. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.

remove(IPortion item)

public final boolean remove(IPortion item)

Removes the first occurrence of a specific object from the IGenericCollection.

Parameters:

ParameterTypeDescription
itemIPortionThe object to remove from the IGenericCollection.

Returns: boolean - true if item was successfully removed from the IGenericCollection; otherwise, false. This method also returns false if item is not found in the original IGenericCollection.

removeAt(int index)

public final void removeAt(int index)

Removes the element at the specified index of the collection.

Parameters:

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

iterator()

public final System.Collections.Generic.IGenericEnumerator<IPortion> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IPortion> - A IGenericEnumerator that can be used to iterate through the collection.

iteratorJava()

public final System.Collections.Generic.IGenericEnumerator<IPortion> iteratorJava()

Returns a java iterator for the entire collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IPortion> - An java.util.Iterator for the entire collection.