jfreerails.world.common
Class GameTime
java.lang.Object
jfreerails.world.common.GameTime
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<GameTime>, FreerailsSerializable
public class GameTime
- extends java.lang.Object
- implements FreerailsSerializable, java.lang.Comparable<GameTime>
This class represents a specific instant in time during a game.
- Author:
- Luke
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
BIG_BANG
public static final GameTime BIG_BANG
- The first possible time.
END_OF_THE_WORLD
public static final GameTime END_OF_THE_WORLD
- The last possible time.
ticks
private final int ticks
GameTime
public GameTime(int l)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
nextTick
public GameTime nextTick()
getTicks
public int getTicks()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
compareTo
public int compareTo(GameTime t)
- Compares two GameTimes for ordering.
- Specified by:
compareTo in interface java.lang.Comparable<GameTime>
- Parameters:
t -
- Returns:
- 0 if t is equal to this GameTime; a value less than 0 if this
GameTime is before t; and a value greater than 0 if this GameTime
is after t.