com.aspose.xps

Class XpsList<T extends XpsElement>

  • All Implemented Interfaces:
    Iterable<T>


    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 Detail

      • XpsList

        public XpsList()

        Creates a new instance of list.

    • Method Detail

      • add

        public T add(T item)

        Adds a new item to the list.

        Parameters:
        item - Item to add.
        Returns:
        Added item.
      • insert

        public T insert(int index,
                        T item)

        Adds a new item to the list at index position.

        Parameters:
        index - Position for the item to be inserted at.
        item - Item to be inserted.
        Returns:
        Inserted item.
      • remove

        public T remove(T item)

        Removes item from the list.

        Parameters:
        item - Item to be removed.
        Returns:
        Removed item.
      • removeAt

        public T removeAt(int index)

        Removes item from the list at index position.

        Parameters:
        index - Position for the item to be removed at.
        Returns:
        Remover item.
      • get

        public T get(int i)

        Provides access to list items by index.

        Parameters:
        i - Position of the item to get access to.
        Returns:
        Item at i postion.
      • size

        public int size()

        Returns the number of items in the list.

        Returns:
        The number of items in the list.
      • iterator

        public Iterator<T> iterator()

        Implementation of Iterable<T> interface.

        Specified by:
        iterator in interface Iterable<T extends XpsElement>
        Returns:
        Returns enumerator for the list.