asposediagram.api

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
methodadd(o)
Adds an item to the CollectionBase instance.
methodclear()
Removes all objects from the CollectionBase instance.
methodcontains(o)
Return whether instance contains this object
methodget(index)
Get an item at specified position.
methodgetCount()
Gets the number of elements contained in the CollectionBase instance.
methodindexOf(o)
Determines the index of a specific item in the CollectionBase instance.
methoditerator()
Returns an enumerator that iterates through the CollectionBase instance.
methodremoveAt(index)
Removes the item at the specified index.
 

    • Constructor Detail

      • CollectionBase

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

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

      • iterator

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

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

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

        int 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

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

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

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

        int 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.