T - generic target type of operatorpublic class StdOperator<T extends ChronoEntity<T>> extends Object implements ChronoOperator<T>
Factory for producing standard chronological operators which are applicable on most chronological entities.
| Modifier and Type | Method and Description |
|---|---|
T |
apply(T entity)
Adjusts given entity and yields a changed copy of argument.
|
static <T extends ChronoEntity<T>> |
atCeiling(ChronoElement<?> element)
Yields an operator which rounds any entity up so that the child
elements will be set to the maximum.
|
static <T extends ChronoEntity<T>> |
atFloor(ChronoElement<?> element)
Yields an operator which rounds any entity down so that the child
elements will be set to the minimum.
|
static <T extends ChronoEntity<T>> |
decremented(ChronoElement<?> element)
Yields a new operator which can set any entity such that its
actual element value gets the decremented value.
|
static <T extends ChronoEntity<T>> |
incremented(ChronoElement<?> element)
Yields a new operator which can set any entity such that its
actual element value gets the incremented value.
|
static <T extends ChronoEntity<T>> |
maximized(ChronoElement<?> element)
Yields a new operator which can set any entity to its maximum
element value.
|
static <T extends ChronoEntity<T>> |
minimized(ChronoElement<?> element)
Yields a new operator which can set any entity to its minimum
element value.
|
static <T extends ChronoEntity<T>,V> |
newValue(V value,
ChronoElement<V> element)
Yields an operator which sets any entity such that its actual
element value will be set in normal mode to given value.
|
static <T extends ChronoEntity<T>,V> |
setLenient(V value,
ChronoElement<V> element)
Yields an operator which sets any entity such that its actual
element value will be set in lenient mode to given value.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitidentitypublic T apply(T entity)
ChronoOperatorAdjusts given entity and yields a changed copy of argument.
Will be called by ChronoEntity.with(ChronoOperator).
apply in interface Function<T extends ChronoEntity<T>,T extends ChronoEntity<T>>apply in interface ChronoOperator<T extends ChronoEntity<T>>entity - chronological entity to be adjustedpublic static <T extends ChronoEntity<T>> ChronoOperator<T> minimized(ChronoElement<?> element)
Yields a new operator which can set any entity to its minimum element value.
T - generic type of target entityelement - associated chronological elementpublic static <T extends ChronoEntity<T>> ChronoOperator<T> maximized(ChronoElement<?> element)
Yields a new operator which can set any entity to its maximum element value.
T - generic type of target entityelement - associated chronological elementpublic static <T extends ChronoEntity<T>> ChronoOperator<T> decremented(ChronoElement<?> element)
Yields a new operator which can set any entity such that its actual element value gets the decremented value.
T - generic type of target entityelement - associated chronological elementTimeAxis.getBaseUnit(ChronoElement)public static <T extends ChronoEntity<T>> ChronoOperator<T> incremented(ChronoElement<?> element)
Yields a new operator which can set any entity such that its actual element value gets the incremented value.
T - generic type of target entityelement - associated chronological elementTimeAxis.getBaseUnit(ChronoElement)public static <T extends ChronoEntity<T>> ChronoOperator<T> atFloor(ChronoElement<?> element)
Yields an operator which rounds any entity down so that the child elements will be set to the minimum.
T - generic type of target entityelement - associated chronological elementpublic static <T extends ChronoEntity<T>> ChronoOperator<T> atCeiling(ChronoElement<?> element)
Yields an operator which rounds any entity up so that the child elements will be set to the maximum.
T - generic type of target entityelement - associated chronological elementpublic static <T extends ChronoEntity<T>,V> ChronoOperator<T> setLenient(V value, ChronoElement<V> element)
Yields an operator which sets any entity such that its actual element value will be set in lenient mode to given value.
T - generic type of target entityV - generic element value typevalue - new element valueelement - associated chronological elementpublic static <T extends ChronoEntity<T>,V> ChronoOperator<T> newValue(V value, ChronoElement<V> element)
Yields an operator which sets any entity such that its actual element value will be set in normal mode to given value.
T - generic type of target entityV - generic element value typevalue - new element valueelement - associated chronological elementCopyright © 2014–2015. All rights reserved.