- Jackson Browne
PrimitiveRefList<>
PrimitiveRefList<> Methods
PrimitiveRefList() | Constructor for the PrimitiveRefList<> class |
Size() | Returns number of items in the list |
AddItem() | Adds an item to the end of the list |
InsertItem() | Inserts an item anywhere in the list using one based position |
SetItem() | Sets the object reference at the specified one based position |
GetItem() | Gets the item at the specified one based position |
RemoveItem() | Removes the item from the list at the one based position and returns reference |
GotoTop() | Moves internal "pointer" to top of list |
GotoBottom() | Moves internal "pointer" to bottom of list |
GetCurrentItem() | Gets "current" object in collection and move pointer position |
IsCurrentValid() | Returns true if the "pointer" currently points at a valid position |
Clear() | Clears the entire list |
Derived Classes
None
See Also
Class Hierarchy, List<>, PrimitiveList<>, ObjectList
public method PrimitiveRefList()
Parameters
None
Return Value
None
Description
Constructor for the PrimitiveRefList<> class.
PrimitiveRefList<> Class
public virtual method<int> Size()
Parameters
None
Return Value
Returns size of collection
Description
This method returns the total number of primitive reference items currently stored in the list.
PrimitiveRefList<> Class
public method AddItem(T ref ObjectReference)
Parameters
ObjectReference
Primitive object reference to be added to list
Return Value
None
Description
This method adds the specified primitive object reference to the end of the list. The storage for the list is handled internally, and automatically grows the list if necessary. The user of the class doesn't need to worry about any of the details.
This method will fire a MemoryException if the system runs out of memory while satisfying the request.
PrimitiveRefList<> Class
public method InsertItem(int Position, T ref ObjectReference)
Parameters
Position
One based position of insert
ObjectReference
Primitive object reference to be added to list
Return Value
None
Description
This method inserts the specified primitive object reference before the one based position which is passed in. This method will fire a MemoryException if the system runs out of memory while satisfying the request.
PrimitiveRefList<> Class
public method SetItem(int Position, T ref ObjectReference)
Parameters
Position
One based position
ObjectReference
Primitive object reference to object to be set in the list
Return Value
None
Description
This method sets the specified primitive object reference at the one based position which is passed in. If the position is greater than the current size of the list, the method will grow the size of the list, and fill in all slots between the "old size" and the "new size" with null. Then the specified primitive object reference is placed at the one based position in the list.
This method will fire a MemoryException if the system runs out of memory while satisfying the request.
PrimitiveRefList<> Class
public method<T ref> GetItem(int Position)
Parameters
Position
One based position
Return Value
Primitive object reference at specified position
Description
This method returns the primitive object reference at the specified one based position in the list. If the position is not valid (less than one or greater than the current size of the list), a value of null is returned.
PrimitiveRefList<> Class
public method<T ref> RemoveItem(int Position)
Parameters
Position
One based position
Return Value
Primitive object reference being removed
Description
This method removes the primitive object reference at the specified one based position from the list and returns the primitive value being removed. If the position is not valid (less than one or greater than the current size of the list), the list is not modified and a value of null is returned.
PrimitiveRefList<> Class
public virtual method GotoTop()
Parameters
None
Return Value
None
Description
This method moves the internal "pointer" to the top of the list. The "GetCurrent()" method returns the object which is at the current pointer location.
PrimitiveRefList<> Class
public virtual method GotoBottom()
Parameters
None
Return Value
None
Description
This method moves the internal "pointer" to the bottom of the list. The "GetCurrentItem()" method returns the object which is at the current pointer location.
PrimitiveRefList<> Class
public virtual method<T ref> GetCurrentItem(bool Forward = true)
Parameters
None
Return Value
Primitive object reference for current item
Description
This method returns the primitive object reference at the current "pointer" location within the list.
If the Forward flag is true, the current pointer location is then advanced to the next object in the list. 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 list. 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 returns null.
PrimitiveRefList<> Class
public virtual method<bool> IsCurrentValid()
Parameters
None
Return Value
True if current position is valid
Description
Virtual method to return true if the "current" pointer within the list points at a valid position, and returns false if not. If the list is empty, or if the end of the list has been surpassed by making a "GetCurrentItem()" call at the end of the list, the current "pointer" does not point at a valid position (and GetCurrentItem() returns null), so this method returns false.
PrimitiveRefList<> Class
public virtual method Clear()
Parameters
None
Return Value
None
Description
This method clears all primitive reference items from the list.
PrimitiveRefList<> Class