jfreerails.world.track
Class NullTrackPiece
java.lang.Object
jfreerails.world.track.NullTrackPiece
- All Implemented Interfaces:
- java.io.Serializable, FreerailsSerializable, TrackPiece
public final class NullTrackPiece
- extends java.lang.Object
- implements TrackPiece
A track piece that doesn't exist - using this avoids needing to check against
null before calling the methods on a track piece.
- Author:
- lindsal
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
nullTrackPiece
private static final TrackPiece nullTrackPiece
NO_OWNER
private static final int NO_OWNER
- See Also:
- Constant Field Values
NullTrackPiece
private NullTrackPiece()
getInstance
public static TrackPiece getInstance()
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
readResolve
private java.lang.Object readResolve()
throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException
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
getOwnerID
public int getOwnerID()
- Specified by:
getOwnerID in interface TrackPiece
getTrackTypeID
public int getTrackTypeID()
- Specified by:
getTrackTypeID in interface TrackPiece