GP
Class Collection

java.lang.Object
  |
  +--GP.Collection
Direct Known Subclasses:
Bag, Matrix, Sequence

public abstract class Collection
extends java.lang.Object


Constructor Summary
Collection()
           
 
Method Summary
 void AddElement(java.lang.Object item)
           
 boolean Contains(java.lang.Object item)
           
 Collection Copy()
           
 void DoForEach(Doable action)
           
 boolean Empty()
           
 void EnsureSize(int i)
           
 java.util.Vector GetBag()
           
 java.lang.Object GetCurrentElement(Doable action)
          Only to be used by the occurance passed into a DoForEach
 java.lang.Object GetRandomElement()
           
 int NumElements()
           
 void RemoveAllElements()
           
 void RemoveElement(java.lang.Object item)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Collection

public Collection()
Method Detail

Copy

public Collection Copy()

GetBag

public java.util.Vector GetBag()

AddElement

public void AddElement(java.lang.Object item)

RemoveElement

public void RemoveElement(java.lang.Object item)

RemoveAllElements

public void RemoveAllElements()

NumElements

public int NumElements()

GetRandomElement

public java.lang.Object GetRandomElement()

Empty

public boolean Empty()

Contains

public boolean Contains(java.lang.Object item)

DoForEach

public void DoForEach(Doable action)

GetCurrentElement

public java.lang.Object GetCurrentElement(Doable action)
Only to be used by the occurance passed into a DoForEach
Returns:
the current element in a clone of the sequence

EnsureSize

public void EnsureSize(int i)
Parameters:
i -  

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object