Package net.time4j.clock
Class AbstractClock
java.lang.Object
net.time4j.clock.AbstractClock
- All Implemented Interfaces:
TimeSource<Moment>
- Direct Known Subclasses:
AdjustableClock
,FixedClock
,NetTimeConnector
Abstract base clock implementation which allows local views within any timezone.
- Since:
- 2.1
- Author:
- Meno Hochschild
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a local clock in system timezone.Creates a local clock in platform timezone.inZonalView(String tzid)
Creates a local clock in given timezone.inZonalView(TZID tzid)
Creates a local clock in given timezone.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.time4j.base.TimeSource
currentInstant, currentTime
-
Constructor Details
-
AbstractClock
public AbstractClock()
-
-
Method Details
-
inPlatformView
Creates a local clock in platform timezone.
- Returns:
- local clock in system timezone (using the platform timezone data)
- Since:
- 3.3/4.2
- See Also:
Timezone.ofPlatform()
-
inLocalView
Creates a local clock in system timezone.
- Returns:
- local clock in system timezone (using the best available timezone data)
- Since:
- 2.1
- See Also:
Timezone.ofSystem()
-
inZonalView
Creates a local clock in given timezone.
- Parameters:
tzid
- timezone id- Returns:
- local clock in given timezone
- Throws:
IllegalArgumentException
- if given timezone cannot be loaded- Since:
- 2.1
-
inZonalView
Creates a local clock in given timezone.
- Parameters:
tzid
- timezone id- Returns:
- local clock in given timezone
- Throws:
IllegalArgumentException
- if given timezone cannot be loaded- Since:
- 2.1
-