jfreerails.world.common
Class ImPoint

java.lang.Object
  extended by jfreerails.world.common.ImPoint
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ImPoint>, FreerailsSerializable

public final class ImPoint
extends java.lang.Object
implements FreerailsSerializable, java.lang.Comparable<ImPoint>

An immutable point.

Author:
Luke
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 int x
           
 int y
           
 
Constructor Summary
ImPoint()
           
ImPoint(int x, int y)
           
ImPoint(java.awt.Point p)
           
 
Method Summary
 int compareTo(ImPoint o)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.awt.Point toPoint()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

x

public final int x

y

public final int y
Constructor Detail

ImPoint

public ImPoint()

ImPoint

public ImPoint(java.awt.Point p)

ImPoint

public ImPoint(int x,
               int y)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toPoint

public java.awt.Point toPoint()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(ImPoint o)
Specified by:
compareTo in interface java.lang.Comparable<ImPoint>