org.nlogo.agent
Class ArrayAgentSet
java.lang.Object
  
org.nlogo.agent.AgentSet
      
org.nlogo.agent.ArrayAgentSet
- All Implemented Interfaces: 
 - AgentSet
 
public final class ArrayAgentSet
- extends AgentSet
 
 
 
 
| Methods inherited from class org.nlogo.agent.AgentSet | 
agents, clearDirected, equalAgentSets, getAgentBit, isDirected, isUndirected, printName, randomSubset, setDirected, type, world | 
 
 
ArrayAgentSet
public ArrayAgentSet(Class<? extends Agent> type,
                     int initialCapacity,
                     boolean removableAgents,
                     World world)
ArrayAgentSet
public ArrayAgentSet(Class<? extends Agent> type,
                     Agent[] agents,
                     World world)
ArrayAgentSet
public ArrayAgentSet(Class<? extends Agent> type,
                     Agent[] agents,
                     String printName,
                     World world)
count
public int count()
- Description copied from interface: 
AgentSet 
- Returns the number of agents in the set
- Specified by:
 count in interface AgentSet- 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
 
 
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