XpsArray

Inheritance: java.lang.Object, com.aspose.xps.XpsObject

public abstract class XpsArray<T> extends XpsObject

Class incapsulating common XPS model array object features.

Methods

MethodDescription
add(T obj)Adds a new object into array.
remove(T obj)Removes an object from array.
insert(int index, T obj)Inserts a new object into array at specified position.
removeAt(int index)Removes an object from array at specified position.
get(int i)Provides access to array’s element by index i .
size()Returns number of elements.

add(T obj)

public T add(T obj)

Adds a new object into array.

Parameters:

ParameterTypeDescription
objTThe object to add.

Returns: T - Added object.

remove(T obj)

public T remove(T obj)

Removes an object from array.

Parameters:

ParameterTypeDescription
objTThe object to remove.

Returns: T - Removed object.

insert(int index, T obj)

public T insert(int index, T obj)

Inserts a new object into array at specified position.

Parameters:

ParameterTypeDescription
indexintThe position to insert an object at.
objTThe object to insert.

Returns: T - Inserted object.

removeAt(int index)

public T removeAt(int index)

Removes an object from array at specified position.

Parameters:

ParameterTypeDescription
indexintThe position to remove an object at.

Returns: T - Removed object.

get(int i)

public T get(int i)

Provides access to array’s element by index i .

Parameters:

ParameterTypeDescription
iintIndex of the element.

Returns: T - The element at i position.

size()

public int size()

Returns number of elements.

Returns: int - The number of elements.