org.nlogo.agent
Class TreeAgentSet

java.lang.Object
  extended by org.nlogo.agent.AgentSet
      extended by org.nlogo.agent.TreeAgentSet

public class TreeAgentSet
extends AgentSet


Nested Class Summary
 class TreeAgentSet.Iterator
           
 
Constructor Summary
TreeAgentSet(Class type, int initialCapacity, String printName, World world)
           
 
Method Summary
 void add(Agent agent)
          It is the caller's responsibility not to add an agent that is already in the set.
 Agent agent(long i)
           
 boolean contains(Agent agent)
           
 int count()
           
 boolean isEmpty()
           
 AgentSet.Iterator iterator()
           
 Agent randomOne(int precomputedCount, int random)
           
 void remove(Object key)
           
 AgentSet.Iterator shufflerator(org.nlogo.util.MersenneTwisterFast random)
           
 Agent[] toArray()
           
 ArrayList toArrayList()
           
 LogoList toLogoList()
           
 String toString()
           
 
Methods inherited from class org.nlogo.agent.AgentSet
clearDirected, equalAgentSets, getAgentBit, isDirected, isUndirected, printName, randomSubset, setDirected, type, world
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeAgentSet

public TreeAgentSet(Class type,
                    int initialCapacity,
                    String printName,
                    World world)
Method Detail

count

public int count()
Specified by:
count in class AgentSet

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in class AgentSet

agent

public Agent agent(long i)
Specified by:
agent in class AgentSet

add

public void add(Agent agent)
It is the caller's responsibility not to add an agent that is already in the set.

Specified by:
add in class AgentSet

remove

public void remove(Object key)

contains

public boolean contains(Agent agent)
Specified by:
contains in class AgentSet

randomOne

public Agent randomOne(int precomputedCount,
                       int random)
Specified by:
randomOne in class AgentSet

toLogoList

public LogoList toLogoList()
Specified by:
toLogoList in class AgentSet

toArrayList

public ArrayList toArrayList()
Specified by:
toArrayList in class AgentSet

toArray

public Agent[] toArray()
Specified by:
toArray in class AgentSet

toString

public String toString()
Overrides:
toString in class Object

iterator

public AgentSet.Iterator iterator()
Specified by:
iterator in class AgentSet

shufflerator

public AgentSet.Iterator shufflerator(org.nlogo.util.MersenneTwisterFast random)
Specified by:
shufflerator in class AgentSet