net.aronnax.CountPaths
Class Vertex

java.lang.Object
  extended by net.aronnax.CountPaths.Vertex

public class Vertex
extends java.lang.Object

Class Vertex represents some point on a 2-D cartesian grid.

Version:
$Id: Vertex.java 13 2010-12-23 05:03:52Z rassilon $

Constructor Summary
Vertex(int x, int y)
          The constructor for Vertex takes it's current location as input.
 
Method Summary
 int getX()
          getX returns the position along the x-axis.
 int getY()
          getY returns the position along the y-axis.
 boolean isEqualTo(Vertex V)
          isEqualTo compares another Vertex to this one.
 java.lang.String toString()
          toString returns the x and y coords of this Vertex in a simple comma separated pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vertex

public Vertex(int x,
              int y)
The constructor for Vertex takes it's current location as input.

Parameters:
x - The position along the x-axis.
y - The position along the y-axis.
Method Detail

getX

public int getX()
getX returns the position along the x-axis.

Returns:
The position along the x-axis.

getY

public int getY()
getY returns the position along the y-axis.

Returns:
The position along the y-axis.

isEqualTo

public boolean isEqualTo(Vertex V)
isEqualTo compares another Vertex to this one. I really should override the equals method here, but laziness won.

Parameters:
V - A Vertex to compare this Vertex to.
Returns:
True if the other Vertex has the same coords as this one.

toString

public java.lang.String toString()
toString returns the x and y coords of this Vertex in a simple comma separated pair. (Think algebra I.)

Overrides:
toString in class java.lang.Object
Returns:
The coordinates of this Vertex as an ordered pair (x,y).