Class ElementOperator<T>
- Type Parameters:
T
- generic target type this operator is applied to
- All Implemented Interfaces:
Function<T,T>
,UnaryOperator<T>
,ChronoOperator<T>
Defines any manipulation of date or wall time objects following the strategy design pattern.
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionat(ZonalOffset offset)
Creates an operator which can adjust aMoment
at the given timezone offset.atUTC()
Equivalent toat(ZonalOffset.UTC)
.Creates an operator which can adjust aMoment
in the given timezone.Creates an operator which can adjust aMoment
in the system timezone.inTimezone(TZID tzid)
Creates an operator which can adjust aMoment
in the given timezone.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.time4j.engine.ChronoOperator
apply
-
Method Details
-
inStdTimezone
Creates an operator which can adjust a
Moment
in the system timezone.Note: Usually the operator converts the given
Moment
to aPlainTimestamp
then processes this local timestamp and finally converts the result back to a newMoment
. A special case are incrementing and decrementing of (sub-)second elements which eventually operate directly on the UTC timeline.- Returns:
- operator with the default system timezone reference,
applicable on instances of
Moment
-
inTimezone
Creates an operator which can adjust a
Moment
in the given timezone.Note: Usually the operator converts the given
Moment
to aPlainTimestamp
then processes this local timestamp and finally converts the result back to a newMoment
. A special case are incrementing and decrementing of (sub-)second elements which eventually operate directly on the UTC timeline.- Parameters:
tzid
- timezone id- Returns:
- operator with the given timezone reference, applicable on
instances of
Moment
- Throws:
IllegalArgumentException
- if given timezone cannot be loaded
-
in
Creates an operator which can adjust a
Moment
in the given timezone.Note: Usually the operator converts the given
Moment
to aPlainTimestamp
then processes this local timestamp and finally converts the result back to a newMoment
. A special case are incrementing and decrementing of (sub-)second elements which eventually operate directly on the UTC timeline.- Parameters:
tz
- timezone- Returns:
- operator with the given timezone reference, applicable on
instances of
Moment
-
atUTC
Equivalent to
at(ZonalOffset.UTC)
.- Returns:
- operator for UTC+00:00, applicable on instances
of
Moment
- Since:
- 1.2
- See Also:
at(ZonalOffset)
-
at
Creates an operator which can adjust a
Moment
at the given timezone offset.Note: Usually the operator converts the given
Moment
to aPlainTimestamp
then processes this local timestamp and finally converts the result back to a newMoment
. A special case are incrementing and decrementing of (sub-)second elements which eventually operate directly on the UTC timeline.- Parameters:
offset
- timezone offset- Returns:
- operator with the given timezone offset, applicable on
instances of
Moment
- Since:
- 1.2
-