Class AgentNode

java.lang.Object
  extended byLLNode
      extended byAgentNode

public class AgentNode
extends LLNode

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


Field Summary
 
Fields inherited from class LLNode
next
 
Constructor Summary
AgentNode()
          Two constructors: One for creating the head of the list , with no agent
AgentNode(Turtle agent)
          One constructor for creating a node with an agent
 
Method Summary
 Turtle getAgent()
          Getter for the turtle
 void remove(Turtle myTurtle)
          Remove the node where this turtle is found.
 void setAgent(Turtle agent)
          Setter for the turtle
 String toString()
          Make a printable form
 
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()
Two constructors: One for creating the head of the list , with no agent


AgentNode

public AgentNode(Turtle agent)
One constructor for creating a node with an agent

Method Detail

toString

public String toString()
Make a printable form


setAgent

public void setAgent(Turtle agent)
Setter for the turtle


getAgent

public Turtle getAgent()
Getter for the turtle


remove

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