world
Class PathKey

java.lang.Object
  |
  +--world.PathKey
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
Path

public class PathKey
extends Object
implements Comparable

Class to record paths through tiles.

Version:
$Revision: 1.1 $
Author:
Allen D. Ball

Field Summary
protected  Tile end
           
protected  Tile start
           
 
Constructor Summary
protected PathKey(Tile start, Tile end)
          Creates a path key.
 
Method Summary
 int compareTo(Object object)
          Compares this object with the specified object for order.
 Tile getEnd()
           
 int getOrdinal()
          Method to get an ordinal ordering for this path with the other paths in its board.
 Tile getStart()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

protected final Tile start

end

protected final Tile end
Constructor Detail

PathKey

protected PathKey(Tile start,
                  Tile end)
Creates a path key.
Method Detail

getStart

public Tile getStart()

getEnd

public Tile getEnd()

compareTo

public int compareTo(Object object)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Specified by:
compareTo in interface Comparable
Parameters:
object - The object to be compared.
See Also:
Comparable

getOrdinal

public int getOrdinal()
Method to get an ordinal ordering for this path with the other paths in its board.


Copyright 2002 Allen D. Ball. All rights reserved.