public class XpsList<T extends XpsElement> extends Object implements Iterable<T>
Class incapsulating list property values features like PathGeometry's list of PathFigures, PathFigure's list of Segments or gradient brush's list of gradient stops.
T
: Any class extending XpsElement
.
Constructor and Description |
---|
XpsList()
Creates a new instance of list.
|
Modifier and Type | Method and Description |
---|---|
T |
add(T item)
Adds a new
item to the list. |
T |
get(int i)
Provides access to list items by index.
|
T |
insert(int index,
T item)
Adds a new
item to the list at index position. |
Iterator<T> |
iterator()
Implementation of
Iterable<T> interface. |
T |
remove(T item)
Removes
item from the list. |
T |
removeAt(int index)
Removes item from the list at
index position. |
int |
size()
Returns the number of items in the list.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public T add(T item)
Adds a new item
to the list.
item
- Item to add.public T insert(int index, T item)
Adds a new item
to the list at index
position.
index
- Position for the item to be inserted at.item
- Item to be inserted.public T remove(T item)
Removes item
from the list.
item
- Item to be removed.public T removeAt(int index)
Removes item from the list at index
position.
index
- Position for the item to be removed at.public T get(int i)
Provides access to list items by index.
i
- Position of the item to get access to.i
postion.public int size()
Returns the number of items in the list.