Class AgentNode

java.lang.Object
  extended by LLNode
      extended by AgentNode

public class AgentNode
extends LLNode

Class to implement a linked list of Turtle-like characters. (Maybe "agents"?)

Author:
Mark Guzdial, Barb Ericson

Constructor Summary
AgentNode()
          A constructor that takes no arguments
AgentNode(Turtle agent)
          A constuctor that takes an agent
 
Method Summary
 Turtle getAgent()
          Method to get the agent (the turtle)
 void remove(Turtle myTurtle)
          Remove the node where the passed turtle is found.
 void setAgent(Turtle agent)
          Method to set the agent turtle
 String toString()
          Method to return an information string
 
Methods inherited from class LLNode
add, count, getNext, insertAfter, last, remove, reverse, reverse2, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentNode

public AgentNode()
A constructor that takes no arguments


AgentNode

public AgentNode(Turtle agent)
A constuctor that takes an agent

Method Detail

toString

public String toString()
Method to return an information string

Overrides:
toString in class Object
Returns:
the information string

setAgent

public void setAgent(Turtle agent)
Method to set the agent turtle

Parameters:
agent - the agent to use

getAgent

public Turtle getAgent()
Method to get the agent (the turtle)

Returns:
the turtle used as an agent

remove

public void remove(Turtle myTurtle)
Remove the node where the passed turtle is found.

Parameters:
myTurtle - the turtle to remove