edu.turtlekit2.kernel.agents
Class AgentFactory
java.lang.Object
edu.turtlekit2.kernel.agents.AgentFactory
public class AgentFactory
- extends Object
This class creates turtlekit agents from their XMLAttributes.
- Version:
- 0.1 - 8/2009
- Author:
- G. Beurier
Method Summary |
static Collection<madkit.kernel.Activator<? extends madkit.kernel.AbstractAgent>> |
getActivators(Element e,
String simulationGroup)
|
static boolean |
getBooleanFromNode(Element e,
String key,
boolean defaultValue)
|
static double |
getDoubleFromNode(Element e,
String key,
double defaultValue)
|
static TurtleEnvironment |
getEnvironment(Element e)
|
static ArrayList<PatchVariable> |
getFlavors(Element e)
|
static String |
getFromNode(Element e,
String key,
String defaultValue)
|
static int |
getIntFromNode(Element e,
String key,
int defaultValue)
|
static Collection<Observer> |
getObservers(Element e)
|
static ArrayList<Element> |
getSons(Element e,
String name)
DOM PARSERS |
static Collection<Turtle> |
getTurtles(Element e)
|
static Collection<XMLAttributes> |
getViewers(Element e)
|
static boolean |
hasActivators(Element e)
|
static TurtleEnvironment |
instanciateEnvironment(Element env)
|
static Observer |
instanciateObserver(XMLAttributes observerTable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMMUNITY
public static final String COMMUNITY
- See Also:
- Constant Field Values
AgentFactory
public AgentFactory()
getEnvironment
public static TurtleEnvironment getEnvironment(Element e)
instanciateEnvironment
public static TurtleEnvironment instanciateEnvironment(Element env)
instanciateObserver
public static Observer instanciateObserver(XMLAttributes observerTable)
getViewers
public static Collection<XMLAttributes> getViewers(Element e)
getObservers
public static Collection<Observer> getObservers(Element e)
getTurtles
public static Collection<Turtle> getTurtles(Element e)
getFlavors
public static ArrayList<PatchVariable> getFlavors(Element e)
getActivators
public static Collection<madkit.kernel.Activator<? extends madkit.kernel.AbstractAgent>> getActivators(Element e,
String simulationGroup)
getSons
public static ArrayList<Element> getSons(Element e,
String name)
- DOM PARSERS
getIntFromNode
public static int getIntFromNode(Element e,
String key,
int defaultValue)
getFromNode
public static String getFromNode(Element e,
String key,
String defaultValue)
getDoubleFromNode
public static double getDoubleFromNode(Element e,
String key,
double defaultValue)
getBooleanFromNode
public static boolean getBooleanFromNode(Element e,
String key,
boolean defaultValue)
hasActivators
public static boolean hasActivators(Element e)