Jadex 0.96

jadex.examples.marsworld
Class Environment

java.lang.Object
  extended by jadex.examples.marsworld.Environment

public class Environment
extends Object

The environment as singleton.


Field Summary
static String CARRY_AGENT
          The carry agent type.
static String PRODUCTION_AGENT
          The production agent type.
static String SENTRY_AGENT
          The sentry agent type.
 
Method Summary
static Environment createInstance()
          Create a new instance.
 AgentInfo[] getAgentInfos()
          Get all agent infos.
 Homebase getHomebase()
          Get the homebase.
static Environment getInstance()
          Get the environment.
 Target getTarget(Location loc)
          Get a target for a location.
 Target getTarget(String id)
          Get the target for the target-id.
 Target[] getTargets()
          The the info for an agent
 Target[] getTargetsNear(Location loc, double tolerance)
          Get all targets near a position.
 void setAgentInfo(AgentInfo agentinfo)
          The the info for an agent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CARRY_AGENT

public static final String CARRY_AGENT
The carry agent type.

See Also:
Constant Field Values

PRODUCTION_AGENT

public static final String PRODUCTION_AGENT
The production agent type.

See Also:
Constant Field Values

SENTRY_AGENT

public static final String SENTRY_AGENT
The sentry agent type.

See Also:
Constant Field Values
Method Detail

getInstance

public static Environment getInstance()
Get the environment.

Returns:
The environment.

createInstance

public static Environment createInstance()
Create a new instance.


getTargets

public Target[] getTargets()
The the info for an agent. / public void addTarget(Location target) { this.targets.put(target.getLocation(), target); } /** Get all targets.


getTargetsNear

public Target[] getTargetsNear(Location loc,
                               double tolerance)
Get all targets near a position.


getHomebase

public Homebase getHomebase()
Get the homebase.


setAgentInfo

public void setAgentInfo(AgentInfo agentinfo)
The the info for an agent.


getAgentInfos

public AgentInfo[] getAgentInfos()
Get all agent infos.


getTarget

public Target getTarget(Location loc)
Get a target for a location. WARNING: Method does not check if more than one target is near.


getTarget

public Target getTarget(String id)
Get the target for the target-id.


Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.