Package net.time4j.clock
Class FixedClock
java.lang.Object
net.time4j.clock.AbstractClock
net.time4j.clock.FixedClock
- All Implemented Interfaces:
TimeSource<Moment>
Represents a fixed clock which always display the same current time.
- Since:
- 2.1
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionYields the current time.boolean
int
hashCode()
static FixedClock
Creates a new fixed clock.toString()
For debugging purposes.Methods inherited from class net.time4j.clock.AbstractClock
inLocalView, inPlatformView, inZonalView, inZonalView
Methods inherited from interface net.time4j.base.TimeSource
currentInstant
-
Method Details
-
of
Creates a new fixed clock.
- Parameters:
ut
- fixed clock time- Returns:
- new clock instance with fixed time
- Since:
- 2.1
-
currentTime
Description copied from interface:TimeSource
Yields the current time.
- Returns:
- current time in seconds (as
UnixTime
object or derivate)
-
equals
-
hashCode
public int hashCode() -
toString
For debugging purposes.
-