aspose.cells

Class 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(capacity)
Initializes a new instance of the CollectionBase class with the specified capacity.
 
Method Summary
functionadd(o)
Adds an item to the CollectionBase instance.
functionclear()
Removes all objects from the CollectionBase instance.
functioncontains(o)
Return whether instance contains this object
functionget(index)
Get an item at specified position.
functiongetCount()
Gets the number of elements contained in the CollectionBase instance.
functionindexOf(o)
Determines the index of a specific item in the CollectionBase instance.
functioniterator()
Returns an enumerator that iterates through the CollectionBase instance.
functionremoveAt(index)
Removes the item at the specified index.
 

    • Constructor Detail

      • CollectionBase

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

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

      • iterator

        function iterator()
        Returns an enumerator that iterates through the CollectionBase instance.
        Returns:
        An iterator for the CollectionBase instance.
      • getCount

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

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

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

        function get(index)
        Get an item at specified position.
        Parameters:
        index: Number - Specified position index.
        Returns:
        The item at specified position.
      • contains

        function contains(o)
        Return whether instance contains this object
        Parameters:
        o: Object - test object
        Returns:
        Whether instance contains this object
      • removeAt

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

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