All Packages Class Hierarchy This Package Previous Next Index
Class jcsp.util.Timer
java.lang.Object
|
+----jcsp.lang.ChannelDataStore
|
+----jcsp.util.Timer
- public class Timer
- extends ChannelDataStore
Description
The Timer is an ChannelDataStore which returns a Long representing the
current time in milliseconds from the system clock.
The Timer is always FULL and discards any Objects passed via put.
- Author:
- P.D.Austin
-
Timer()
-
-
clone()
- Returns a new Object with the same creation parameters as this Object.
-
get()
- Returns a Long representing the current time in milliseconds.
-
getState()
- Returns the current state of the Timer (always returns FULL)
-
put(Object)
- This method discards the Object as writing to a Timer does not make
sense.
Timer
public Timer()
get
protected Object get()
- Returns a Long representing the current time in milliseconds.
- Returns:
- The current time in milliseconds
- Overrides:
- get in class ChannelDataStore
put
protected void put(Object object)
- This method discards the Object as writing to a Timer does not make
sense.
- Parameters:
- The - object to put in the Timer
- Overrides:
- put in class ChannelDataStore
getState
protected int getState()
- Returns the current state of the Timer (always returns FULL)
- Returns:
- The current state of the Timer
- Overrides:
- getState in class ChannelDataStore
clone
protected Object clone()
- Returns a new Object with the same creation parameters as this Object.
This method should be overridden by subclasses to return a new Object
that is the same type as this Object. The new instance should be created
by constructing a new instance with the same parameters as the original.
NOTE: Only the sizes of the data should be cloned not the stored data.
- Returns:
- The cloned instance of this Object.
- Overrides:
- clone in class ChannelDataStore
All Packages Class Hierarchy This Package Previous Next Index