mocman.util.data
Class Node<T>

java.lang.Object
  extended by mocman.util.data.Node<T>

public class Node<T>
extends java.lang.Object

Generic Node type It contains 2 dimensional coordinates, a value and a color. It is designed to be shown on an awt from. This class is used later as nodes and edges.

Author:
Tibor Zoltan Varkonyi

Constructor Summary
Node()
          Default constructor
Node(T val)
          Value only constructor
Node(T val, int x, int y, java.awt.Color color)
          Full constructor
 
Method Summary
 java.awt.Color getColor()
          Gets the color
 T getValue()
          Gets the value
 int getX()
          Gets the X coordinate
 int getY()
          Gets the Y coordinate
 void setColor(java.awt.Color c)
          Sets the color
 void setValue(T i)
          Sets the value
 void setX(int i)
          Sets the X coordinate
 void setY(int i)
          Sets the Y coordinate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node()
Default constructor


Node

public Node(T val)
Value only constructor

Parameters:
val - the value

Node

public Node(T val,
            int x,
            int y,
            java.awt.Color color)
Full constructor

Parameters:
val - the value
x - the horizontal coordinate
y - the vertical coordinate
color - color
Method Detail

getX

public int getX()
Gets the X coordinate


getY

public int getY()
Gets the Y coordinate


setX

public void setX(int i)
Sets the X coordinate


setY

public void setY(int i)
Sets the Y coordinate


getValue

public T getValue()
Gets the value


setValue

public void setValue(T i)
Sets the value


setColor

public void setColor(java.awt.Color c)
Sets the color


getColor

public java.awt.Color getColor()
Gets the color