jfreerails.world.track
Class TrackPieceImpl

java.lang.Object
  extended by jfreerails.world.track.TrackPieceImpl
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable, TrackPiece

public final class TrackPieceImpl
extends java.lang.Object
implements TrackPiece

Represents the track on a tile.

Author:
Luke
See Also:
Serialized Form

Field Summary
private  TrackConfiguration configuration
           
private  int ownerID
           
private  int ruleNumber
           
private static long serialVersionUID
           
private  TrackRule trackType
           
 
Constructor Summary
TrackPieceImpl(TrackConfiguration c, TrackRule type, int owner, int rule)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getOwnerID()
           
 TrackConfiguration getTrackConfiguration()
           
 int getTrackGraphicID()
           
 TrackRule getTrackRule()
           
 int getTrackTypeID()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

configuration

private final TrackConfiguration configuration

trackType

private final TrackRule trackType

ownerID

private final int ownerID

ruleNumber

private final int ruleNumber
Constructor Detail

TrackPieceImpl

public TrackPieceImpl(TrackConfiguration c,
                      TrackRule type,
                      int owner,
                      int rule)
Method Detail

equals

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

hashCode

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

getTrackGraphicID

public int getTrackGraphicID()
Specified by:
getTrackGraphicID in interface TrackPiece

getTrackRule

public TrackRule getTrackRule()
Specified by:
getTrackRule in interface TrackPiece

getTrackConfiguration

public TrackConfiguration getTrackConfiguration()
Specified by:
getTrackConfiguration in interface TrackPiece

getOwnerID

public int getOwnerID()
Specified by:
getOwnerID in interface TrackPiece

getTrackTypeID

public int getTrackTypeID()
Specified by:
getTrackTypeID in interface TrackPiece