org.nlogo.agent
Class ArrayAgentSet

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

public final class ArrayAgentSet
extends AgentSet


Nested Class Summary
 class ArrayAgentSet.Iterator
           
 
Constructor Summary
ArrayAgentSet(Class type, Agent[] agents, String printName, World world)
           
ArrayAgentSet(Class type, Agent[] agents, World world)
           
ArrayAgentSet(Class type, int initialCapacity, boolean removableAgents, World world)
           
 
Method Summary
 void add(Agent agent)
           
 Agent agent(long i)
           
 boolean contains(Agent agent)
           
 int count()
           
 boolean isEmpty()
           
 AgentSet.Iterator iterator()
           
 Agent randomOne(int precomputedCount, int random)
           
 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

ArrayAgentSet

public ArrayAgentSet(Class type,
                     int initialCapacity,
                     boolean removableAgents,
                     World world)

ArrayAgentSet

public ArrayAgentSet(Class type,
                     Agent[] agents,
                     World world)

ArrayAgentSet

public ArrayAgentSet(Class type,
                     Agent[] agents,
                     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)
Specified by:
add in class AgentSet

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