- Jimmy Cliff
-- or --
- Otis Redding and Steve Cropper
Collection
Collection Methods
Collection() | Constructor for the Collection class |
Size() | Abstract method to return number of items in the collection |
GotoTop() | Abstract method to move internal "pointer" to top of list |
GotoBottom() | Abstract method to move internal "pointer" to bottom of list |
GetCurrentItem() | Abstract method to get "current" object in collection and move pointer position |
IsCurrentValid() | Abstract method to return true if the "pointer" currently points at a valid position |
Clear() | Abstract method to clear the entire list |
Derived Classes
ObjectList, List<>, PrimitiveList<>, PrimitiveRefList<>, ObjectQueue, Queue<>, PrimitiveQueue<>, PrimitiveRefQueue<>
See Also
public method Collection()
Parameters
None
Return Value
None
Description
Constructor for the abstract Collection class.
Collection Class
public abstract method<int> Size()
Parameters
None
Return Value
Returns size of collection
Description
Abstract method to return the total number of objects currently stored in the collection.
Collection Class
public abstract method GotoTop()
Parameters
None
Return Value
None
Description
Abstract method to move the internal "pointer" to the top of the collection (which is defined internally by each type of collection). The "GetCurrent()" method returns the object which is at the current pointer location.
Collection Class
public abstract method GotoBottom()
Parameters
None
Return Value
None
Description
Abstract method to move the internal "pointer" to the bottom of the collection (which is defined internally by each type of collection). The "GetCurrent()" method returns the object which is at the current pointer location.
Collection Class
public abstract method<Base> GetCurrentItem(bool Forward = true)
Parameters
None
Return Value
Reference to current item
Description
Abstract method to return a reference to the object at the current "pointer" location within the collection.
If the Forward flag is true, the current pointer location is then advanced to the next object. If currently at the last position, the pointer is advanced to a "null" position.
If the forward flag is false, the current pointer is moved to the previous object in the collection. If currently at the first position, the pointer is advanced to the "null" position.
If the pointer ends up at the "null" position, the next "GetCurrentItem()" call will return null. The "GotoTop()" or "GotoBottom()" method must be used to reset the pointer to a valid position.
If the collection is empty, this method also returns null.
Collection Class
public abstract method<bool> IsCurrentValid()
Parameters
None
Return Value
True if current position is valid
Description
Abstract method to return true if the "current" pointer within the collection points at a valid position, and returns false if not. If the collection is empty, or if the end of the collection has been surpassed by making a "GetCurrentItem()" call at the end of the collection, the current "pointer" does not point at a valid position (and GetCurrentItem() returns null), so this method returns false.
Collection Class
public abstract method Clear()
Parameters
None
Return Value
None
Description
Abstract method to clear all items from the collection.
Collection Class