generator2
Class Time

java.lang.Object
  |
  +--generator2.Time

public class Time
extends java.lang.Object

Representation of the time.


Constructor Summary
Time(java.util.Properties properties, int maxTime)
          Time constructor.
 
Method Summary
 int getCurrTime()
          Returns the current time.
 int getMaxTime()
          Returns the maximum time.
 void increaseCurrTime()
          Increases the current time.
static boolean isFirstTimeStamp(int time)
          Tests whether the time stamp is the first or not.
 boolean isMaximumTimeExceeded()
          Returns if the maximum time is exceeded.
 boolean isMaximumTimeReached()
          Returns if the maximum time is reached.
 void reset()
          Resets the current time.
protected  void setCurrTime(int newCurrTime)
          Sets the current to a new value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Time

public Time(java.util.Properties properties,
            int maxTime)
Time constructor.

Parameters:
properties - properties of the generator
maxTime - the maximum time
Method Detail

getCurrTime

public int getCurrTime()
Returns the current time.

Returns:
current time

getMaxTime

public int getMaxTime()
Returns the maximum time.

Returns:
maximum time

increaseCurrTime

public void increaseCurrTime()
Increases the current time.


isMaximumTimeReached

public boolean isMaximumTimeReached()
Returns if the maximum time is reached.

Returns:
maximum time is reached?

isFirstTimeStamp

public static boolean isFirstTimeStamp(int time)
Tests whether the time stamp is the first or not.

Parameters:
time - the time stamp
Returns:
is first?

isMaximumTimeExceeded

public boolean isMaximumTimeExceeded()
Returns if the maximum time is exceeded.

Returns:
maximum time is exceeded?

reset

public void reset()
Resets the current time.


setCurrTime

protected void setCurrTime(int newCurrTime)
Sets the current to a new value.

Parameters:
newCurrTime - new current time