com.aspose.cells

Class CollectionBase

  • java.lang.Object
    • com.aspose.cells.CollectionBase
Provides the abstract base class for a strongly typed collection.

Constructor Summary
CollectionBase()
Initializes a new instance of the CollectionBase class with the default initial capacity.
CollectionBase(intcapacity)
Initializes a new instance of the CollectionBase class with the specified capacity.
 
Method Summary
intadd(java.lang.Object o)
Adds an item to the CollectionBase instance.
voidclear()
Removes all objects from the CollectionBase instance.
booleancontains(java.lang.Object o)
Return whether instance contains this object
java.lang.Objectget(int index)
Get an item at specified position.
intgetCount()
Gets the number of elements contained in the CollectionBase instance.
intindexOf(java.lang.Object o)
Determines the index of a specific item in the CollectionBase instance.
java.util.Iteratoriterator()
Returns an enumerator that iterates through the CollectionBase instance.
voidremoveAt(int index)
Removes the item at the specified index.
 

    • Constructor Detail

      • CollectionBase

        public CollectionBase()
        Initializes a new instance of the CollectionBase class with the default initial capacity.
      • CollectionBase

        public CollectionBase(int capacity)
        Initializes a new instance of the CollectionBase class with the specified capacity.
        Parameters:
        capacity - The number of elements that the new list can initially store.
    • Method Detail

      • iterator

        public java.util.Iterator iterator()
        Returns an enumerator that iterates through the CollectionBase instance.
        Returns:
        An iterator for the CollectionBase instance.
      • getCount

        public int getCount()
        Gets the number of elements contained in the CollectionBase instance.
        Returns:
        The number of elements contained in the CollectionBase instance.
      • clear

        public void clear()
        Removes all objects from the CollectionBase instance.
      • add

        public int add(java.lang.Object o)
        Adds an item to the CollectionBase instance.
        Parameters:
        o - The Object to add to the CollectionBase instance.
        Returns:
        The position into which the new element was inserted.
      • get

        public java.lang.Object get(int index)
        Get an item at specified position.
        Parameters:
        index - Specified position index.
        Returns:
        The item at specified position.
      • contains

        public boolean contains(java.lang.Object o)
        Return whether instance contains this object
        Parameters:
        o - test object
        Returns:
        Whether instance contains this object
      • removeAt

        public void removeAt(int index)
        Removes the item at the specified index.
        Parameters:
        index - The zero-based index of the item to remove.
      • indexOf

        public int indexOf(java.lang.Object o)
        Determines the index of a specific item in the CollectionBase instance.
        Parameters:
        o - Determines the index of a specific item in the CollectionBase instance.
        Returns:
        The index of value if found in the list; otherwise, -1.