com.aspose.html.dom.svg.collections

Class SVGListBase<T>

    • Constructor Detail

      • SVGListBase

        protected SVGListBase()

        Initializes a new instance of the SVGListBase{T} class.

      • SVGListBase

        protected SVGListBase(com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T> enumerable)

        Initializes a new instance of the SVGListBase{T} class.

        Parameters:
        enumerable - The enumerable.
    • Method Detail

      • getLength

        @DOMNameAttribute(name="length")
        public long getLength()

        The number of items in the list.

        Value: The number of items.
      • getNumberOfItems

        @DOMNameAttribute(name="numberOfItems")
        public long getNumberOfItems()

        The number of items in the list.

        Value: The number of items.
      • initialize

        @DOMNameAttribute(name="initialize")
        public T initialize(T newItem)

        Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.

        Parameters:
        newItem - The item which should become the only member of the list.
        Returns:
        The item being inserted into the list.
        Throws:
        DOMException - Code DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
      • getItem

        @DOMNameAttribute(name="getItem")
        public T getItem(long index)

        Returns the specified item from the list.

        Parameters:
        index - The index of the item from the list which is to be returned. The first item is number 0.
        Returns:
        The selected item.
        Throws:
        DOMException - Code DOMException.INDEX_SIZE_ERR. Raised if the index number is greater than or equal to numberOfItems.
      • insertItemBefore

        @DOMNameAttribute(name="insertItemBefore")
        public T insertItemBefore(T newItem,
                                                                             long index)

        Inserts a new item into the list at the specified position. The first item is number 0.

        Parameters:
        newItem - The item which is to be inserted into the list.
        index - The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.
        Returns:
        The inserted item.
        Throws:
        DOMException - Code DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
      • iterator

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

        Gets the enumerator.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Returns:
        An IEnumerator object that can be used to iterate through the collection.
      • dispose

        protected void dispose(boolean disposing)

        Releases unmanaged and - optionally - managed resources.

        Overrides:
        dispose in class SVGValueType
        Parameters:
        disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.