AIILE.gridworld.env
Class GridNode

java.lang.Object
  extended byAIILE.gridworld.env.GridNode
All Implemented Interfaces:
Node

public class GridNode
extends java.lang.Object
implements Node


Constructor Summary
GridNode(int x, int y, java.lang.Object gridObj, GridNodeDisplay nDisplay, java.lang.String t)
          Creates a new instance of GridNode
This sets the location of the node at x and y.
 
Method Summary
 GridHint getHint()
          This gets the hint for this node.
 NodeDisplay getNodeDisplay()
          This gets a GUI display properties.
 java.lang.Object getNodeObject()
          This gets a default Object of the user's choosing.
 java.lang.String getType()
          This gets the type of node that this is.
 int getX()
          This provides the pysical x location of this node in the grid
 int getY()
          This provides the pysical y location of this node in the grid
 void setHint(GridHint gh)
          This sets the hint for this node.
 void setNodeDisplay(NodeDisplay comp)
          This sets a GUI display properties.
 void setNodeObject(java.lang.Object o)
          This sets a default Object of the user's choosing.
 void setType(java.lang.String t)
          This sets the type of node that is
 java.lang.String toString()
          Provides command line output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridNode

public GridNode(int x,
                int y,
                java.lang.Object gridObj,
                GridNodeDisplay nDisplay,
                java.lang.String t)
Creates a new instance of GridNode
This sets the location of the node at x and y. A default Object of the users choosing, not currently used. The display properties of this node for GUI display, and a type of node that this is. This type is the node weight, goal, start, 'X' or '-'.

Method Detail

getX

public int getX()
This provides the pysical x location of this node in the grid

Returns:
int

getY

public int getY()
This provides the pysical y location of this node in the grid

Returns:
int

getNodeObject

public java.lang.Object getNodeObject()
This gets a default Object of the user's choosing.

Specified by:
getNodeObject in interface Node

setNodeObject

public void setNodeObject(java.lang.Object o)
This sets a default Object of the user's choosing.

Specified by:
setNodeObject in interface Node

getNodeDisplay

public NodeDisplay getNodeDisplay()
This gets a GUI display properties.

Specified by:
getNodeDisplay in interface Node
See Also:
GridNodeDisplay

setNodeDisplay

public void setNodeDisplay(NodeDisplay comp)
This sets a GUI display properties.

Specified by:
setNodeDisplay in interface Node
See Also:
GridNodeDisplay

getType

public java.lang.String getType()
This gets the type of node that this is. This type is loaded in from the .env file.

Specified by:
getType in interface Node

setType

public void setType(java.lang.String t)
Description copied from interface: Node
This sets the type of node that is

Specified by:
setType in interface Node

toString

public java.lang.String toString()
Description copied from interface: Node
Provides command line output

Specified by:
toString in interface Node

setHint

public void setHint(GridHint gh)
This sets the hint for this node. This hint may the direction of the node. the distance to goal and the direction of the goal from the current node.

See Also:
AIILE.gridworld.util.GridHint

getHint

public GridHint getHint()
This gets the hint for this node. This hint may the direction of the node. the distance to goal and the direction of the goal from the current node.

Specified by:
getHint in interface Node
See Also:
AIILE.gridworld.util.GridHint