jfreerails.world.track
Class NullTrackType
java.lang.Object
jfreerails.world.track.NullTrackType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<TrackRule>, FreerailsSerializable, TrackRule
public final class NullTrackType
- extends java.lang.Object
- implements TrackRule
The type of a Null track piece. TODO maybe it would be simplier to get rid of
this and jsut check against null!
- 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
NULL_TRACK_TYPE_RULE_NUMBER
public static final int NULL_TRACK_TYPE_RULE_NUMBER
- See Also:
- Constant Field Values
nullTrackType
private static final NullTrackType nullTrackType
NullTrackType
private NullTrackType()
readResolve
private java.lang.Object readResolve()
throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException
getInstance
public static NullTrackType getInstance()
canBuildOnThisTerrainType
public boolean canBuildOnThisTerrainType(TerrainType.Category TerrainType)
- Specified by:
canBuildOnThisTerrainType in interface TrackRule
getLegalRoutes
public Step[] getLegalRoutes(Step directionComingFrom)
- Specified by:
getLegalRoutes in interface TrackRule
getMaximumConsecutivePieces
public int getMaximumConsecutivePieces()
- Specified by:
getMaximumConsecutivePieces in interface TrackRule
getTypeName
public java.lang.String getTypeName()
- Specified by:
getTypeName in interface TrackRule
testTrackPieceLegality
public boolean testTrackPieceLegality(int trackTemplateToTest)
- Specified by:
testTrackPieceLegality in interface TrackRule
trackPieceIsLegal
public boolean trackPieceIsLegal(TrackConfiguration config)
- Specified by:
trackPieceIsLegal in interface TrackRule
getLegalConfigurationsIterator
public java.util.Iterator<TrackConfiguration> getLegalConfigurationsIterator()
- Specified by:
getLegalConfigurationsIterator in interface TrackRule
getTrackPiece
public TrackPiece getTrackPiece(TrackConfiguration config,
int owner)
isStation
public boolean isStation()
- Specified by:
isStation in interface TrackRule
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
getStationRadius
public int getStationRadius()
- Specified by:
getStationRadius in interface TrackRule
getPrice
public Money getPrice()
- Specified by:
getPrice in interface TrackRule
getMaintenanceCost
public Money getMaintenanceCost()
- Specified by:
getMaintenanceCost in interface TrackRule
getCategory
public TrackRule.TrackCategories getCategory()
- Specified by:
getCategory in interface TrackRule
compareTo
public int compareTo(TrackRule arg0)
- Specified by:
compareTo in interface java.lang.Comparable<TrackRule>
isDouble
public boolean isDouble()
- Specified by:
isDouble in interface TrackRule
getFixedCost
public Money getFixedCost()
- Specified by:
getFixedCost in interface TrackRule