Examples of classDisplayName()


Examples of org.nlogo.agent.Agent.classDisplayName()

      }
    } else if (target instanceof Agent) {
      Agent agent = (Agent) target;
      if (agent.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", agent.classDisplayName()));
      }
      agentset = new ArrayAgentSet(agent.getAgentClass(), 1, false, world);
      agentset.add(agent);
    } else {
      throw new ArgumentTypeException(context, this, 0, Syntax.AgentsetType() | Syntax.AgentType(), target);
View Full Code Here

Examples of org.nlogo.agent.Agent.classDisplayName()

    Object agentOrSet = args[1].report(context);
    if (agentOrSet instanceof Agent) {
      Agent agent = (Agent) agentOrSet;
      if (agent.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", agent.classDisplayName()));
      }
      args[0].checkAgentClass(agent, context);
      return new Context(context, agent).evaluateReporter(agent, args[0]);
    } else if (agentOrSet instanceof AgentSet) {
      AgentSet sourceSet = (AgentSet) agentOrSet;
View Full Code Here

Examples of org.nlogo.agent.Agent.classDisplayName()

  public void perform(final org.nlogo.nvm.Context context)
      throws LogoException {
    Agent otherAgent = argEvalAgent(context, 0);
    if (otherAgent.id == -1) {
      throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", otherAgent.classDisplayName()));
    }
    if (otherAgent instanceof org.nlogo.agent.Link) {
      throw new EngineException(context, this, "you can't move-to a link");
    }
    try {
View Full Code Here

Examples of org.nlogo.agent.Agent.classDisplayName()

      throw new EngineException
          (context, this, I18N.errorsJ().get("org.nlogo.prim.etc.$common.expectedTurtleOrPatchButGotLink"));
    }
    if (agent.id == -1) {
      throw new EngineException(context, this,
        I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", agent.classDisplayName()));
    }
    try {
      return validDouble
          (world.protractor().towards
              (context.agent, agent, true)); // true = wrap
View Full Code Here

Examples of org.nlogo.agent.Turtle.classDisplayName()

    List<Turtle> resultList = new ArrayList<Turtle>();
    if (agentOrSet instanceof Turtle) {
      Turtle turtle = (Turtle) agentOrSet;
      if (turtle.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", turtle.classDisplayName()));
      }
      addAll(resultList, turtle.getPatchHere().turtlesHere());
    } else if (agentOrSet instanceof Patch) {
      addAll(resultList, ((Patch) agentOrSet).turtlesHere());
    } else if (agentOrSet instanceof AgentSet) {
View Full Code Here

Examples of org.nlogo.agent.Turtle.classDisplayName()

    AgentSet breed = world.getBreed(breedName);
    if (agentOrSet instanceof Turtle) {
      Turtle turtle = (Turtle) agentOrSet;
      if (turtle.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", turtle.classDisplayName()));
      }
      for (Turtle t : turtle.getPatchHere().turtlesHere()) {
        if (t.getBreed() == breed) {
          resultList.add(t);
        }
View Full Code Here

Examples of org.nlogo.agent.Turtle.classDisplayName()

    AgentSet breed = world.getBreed(breedName);
    if (agent instanceof Turtle) {
      Turtle turtle = (Turtle) agent;
      if (turtle.id == -1) {
        throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", turtle.classDisplayName()));
      }
      for (Turtle t : turtle.getPatchHere().turtlesHere()) {
        if (t.getBreed() == breed) {
          resultList.add(t);
        }
View Full Code Here

Examples of org.nlogo.agent.Turtle.classDisplayName()

  @Override
  public void perform(final org.nlogo.nvm.Context context) throws LogoException {
    Turtle turtle = argEvalTurtle(context, 0);
    if (turtle.id == -1) {
      throw new EngineException(context, this,
        I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", turtle.classDisplayName()));
    }
    world.observer().setPerspective(PerspectiveJ.RIDE(), turtle);
    world.observer().followDistance(0);
    context.ip = next;
  }
View Full Code Here

Examples of org.nlogo.agent.Turtle.classDisplayName()

  public void perform(final Context context)
      throws LogoException {
    Turtle turtle = argEvalTurtle(context, 0);
    if (turtle.id == -1) {
      throw new EngineException(context, this,
        I18N.errorsJ().getN("org.nlogo.$common.thatAgentIsDead", turtle.classDisplayName()));
    }
    world.observer().setPerspective(PerspectiveJ.FOLLOW(), turtle);
    // the following code is duplicated in _follow and _followme - ST 6/28/05
    int distance = (int) turtle.size() * 5;
    world.observer()
View Full Code Here

Examples of org.nlogo.api.JobOwner.classDisplayName()

    }
    if (owner.isCommandCenter()) {
      try {
        CompilerResults results =
            workspace.compiler().compileMoreCode
                (owner.source(), scala.Some.apply(owner.classDisplayName()), workspace.world.program(),
                    workspace.getProcedures(), workspace.getExtensionManager());
        results.head().init(workspace);
        results.head().setOwner(owner);
        new org.nlogo.window.Events.CompiledEvent
            (owner, workspace.world.program(), results.head(), null).raise(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.