jurpe.dungeon.crawler
Class HexPoint

java.lang.Object
  extended by jurpe.dungeon.crawler.HexPoint
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HexMapPoint, RpgMapPoint

public abstract class HexPoint
extends java.lang.Object
implements java.io.Serializable

Base point class for each point.

See Also:
Serialized Form

Field Summary
 short x
           
 short y
           
 
Constructor Summary
HexPoint()
          Empty constructor
HexPoint(java.awt.Point c)
          Costructor.
HexPoint(short xx, short yy)
          Construction.
 
Method Summary
 boolean equals(java.lang.Object o)
          Equality
 int hashCode()
          Hash code
 java.awt.Point toPoint()
          Returns a Point from this HexPoint
 java.lang.String toString()
          String
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public short x

y

public short y
Constructor Detail

HexPoint

public HexPoint()
Empty constructor


HexPoint

public HexPoint(java.awt.Point c)
Costructor. Initialize HexPoint with the given point. Only x and y are taken from Point properties

Parameters:
c -

HexPoint

public HexPoint(short xx,
                short yy)
Construction.

Parameters:
xx - X coordinate
yy - Y coordinate
Method Detail

hashCode

public int hashCode()
Hash code

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Equality

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
String

Overrides:
toString in class java.lang.Object

toPoint

public java.awt.Point toPoint()
Returns a Point from this HexPoint

Returns:
Point from this HexPoint
See Also:
Point

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net