Package net.time4j
Interface WallTimeElement
- All Superinterfaces:
ChronoElement<PlainTime>
,Comparator<ChronoDisplay>
,ZonalElement<PlainTime>
Represents the wall time.
Defines additional operators for moving a timestamp to a new wall time possibly changing the day.
- Since:
- 1.2
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionPerforms rounding to full hour in half rounding mode.Performs rounding to full minute in half rounding mode.Moves a timestamp to the next given wall time and change the day if necessary.Adjusts to next full hour.Adjusts to next full minute.setToNextOrSame(PlainTime value)
Moves a timestamp to the next or same given wall time and change the day if necessary.setToPrevious(PlainTime value)
Moves a timestamp to the previous given wall time and change the day backwards if necessary.setToPreviousOrSame(PlainTime value)
Moves a timestamp to the previous or same given wall time and change the day backwards if necessary.Methods inherited from interface net.time4j.engine.ChronoElement
compare, getDefaultMaximum, getDefaultMinimum, getDisplayName, getSymbol, getType, isDateElement, isLenient, isTimeElement, name
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface net.time4j.ZonalElement
at, atUTC, in, inStdTimezone, inTimezone
-
Method Details
-
setToNext
Moves a timestamp to the next given wall time and change the day if necessary.
- Parameters:
value
- new wall time which is after current wall time- Returns:
- operator directly applicable on
PlainTimestamp
- Since:
- 1.2
- See Also:
PlainTimestamp.with(ElementOperator)
-
setToPrevious
Moves a timestamp to the previous given wall time and change the day backwards if necessary.
- Parameters:
value
- new wall time which is before current wall time- Returns:
- operator directly applicable on
PlainTimestamp
- Since:
- 1.2
- See Also:
PlainTimestamp.with(ElementOperator)
-
setToNextOrSame
Moves a timestamp to the next or same given wall time and change the day if necessary.
- Parameters:
value
- new wall time which is not before current wall time- Returns:
- operator directly applicable on
PlainTimestamp
- Since:
- 1.2
- See Also:
PlainTimestamp.with(ElementOperator)
-
setToPreviousOrSame
Moves a timestamp to the previous or same given wall time and change the day backwards if necessary.
- Parameters:
value
- new wall time which is not after current wall time- Returns:
- operator directly applicable on
PlainTimestamp
- Since:
- 1.2
- See Also:
PlainTimestamp.with(ElementOperator)
-
roundedToFullHour
ElementOperator<PlainTime> roundedToFullHour()Performs rounding to full hour in half rounding mode.
- Returns:
- operator also applicable on
PlainTimestamp
- Since:
- 1.2
-
roundedToFullMinute
ElementOperator<PlainTime> roundedToFullMinute()Performs rounding to full minute in half rounding mode.
- Returns:
- operator also applicable on
PlainTimestamp
- Since:
- 1.2
-
setToNextFullHour
ElementOperator<PlainTime> setToNextFullHour()Adjusts to next full hour.
- Returns:
- operator also applicable on
PlainTimestamp
- Since:
- 1.2
-
setToNextFullMinute
ElementOperator<PlainTime> setToNextFullMinute()Adjusts to next full minute.
- Returns:
- operator also applicable on
PlainTimestamp
- Since:
- 1.2
-