Class Coordinate3D

java.lang.Object
  |
  +--Coordinate3D

public class Coordinate3D
extends Object

A 3D co-ordinate.


Constructor Summary
Coordinate3D(Coordinate3D other)
          Create a new 3D co-ordinate from an existing one.
Coordinate3D(int x, int y, int z)
          Create a new 3D co-ordinate.
 
Method Summary
 boolean equals(Object other)
          Test equality with another 3D co-ordinate.
 String toString()
          Get a String representation of the co-ordinate.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Coordinate3D

public Coordinate3D(int x,
                    int y,
                    int z)
Create a new 3D co-ordinate.
Parameters:
x - The x co-ordinate.
y - The x co-ordinate.
z - The x co-ordinate.

Coordinate3D

public Coordinate3D(Coordinate3D other)
Create a new 3D co-ordinate from an existing one.
Parameters:
other - The 3D co-ordinate to copy from.
Method Detail

toString

public String toString()
Get a String representation of the co-ordinate.
Overrides:
toString in class Object
Returns:
A String of the form Coordinate3D[x,y,z].

equals

public boolean equals(Object other)
Test equality with another 3D co-ordinate.
Overrides:
equals in class Object
Parameters:
other - The 3D co-ordinate to compare to.
Returns:
True if they are the same co-ordinates.