Class Group<A extends HObject>

  extended by hermes.GenericGroup<A,java.util.ArrayList<A>>
      extended by hermes.Group<A>
Type Parameters:
A - the type of being to be stored
All Implemented Interfaces:
KeySubscriber, MouseSubscriber, MouseWheelSubscriber, OscSubscriber

public class Group<A extends HObject>
extends GenericGroup<A,java.util.ArrayList<A>>

Groups together Beings that share common attributes and interact with other HObjects.

Group uses an ArrayList to keep track of Beings. Use GenericGroup if you want to use a different data structure or keep track of things that aren't Beings.

Groups are used for the same reasons as GenericGroups. See JavaDocs for GenericGroup for more details.

Field Summary
Fields inherited from class hermes.GenericGroup
Constructor Summary
Group(World world)
          Constructs a new empty group.
Method Summary
 A get(int index)
          Retrieves the being at a specific index.
 int getIndex(A being)
          Finds the location of being in the group.
Methods inherited from class hermes.GenericGroup
add, addAll, clear, destroy, getObjects, getWorld, hasNeedsMoreSamples, iterator, receive, receive, receive, receive, remove, removeAll, setWorld, size, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Group(World world)
Constructs a new empty group.

world - the world containing the group
Method Detail


public A get(int index)
Retrieves the being at a specific index.

index - the index to fetch from
the being at index


public int getIndex(A being)
Finds the location of being in the group.

being - the being
the index at which the being is stored