Package com.storedobject.common
Class CheckWithPrevious<T>
java.lang.Object
com.storedobject.common.CheckWithPrevious<T>
-
Constructor Summary
ConstructorsConstructorDescriptionCheckWithPrevious
(BiPredicate<? super T, ? super T> checker) ConstructorCheckWithPrevious
(T initial, BiPredicate<? super T, ? super T> checker) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the previous value that is compared with the current value.void
setPrevious
(T previous) Sets the previous value that is to be compared with the current value.boolean
-
Constructor Details
-
CheckWithPrevious
Constructor- Parameters:
checker
- A BiPredicate that defines the validation to take place between the current and the previous values.
-
CheckWithPrevious
Constructor- Parameters:
initial
- The initial value to compare/ check.checker
- A BiPredicate that defines the validation to take place between the current and the previous values.
-
-
Method Details
-
test
-
setPrevious
Sets the previous value that is to be compared with the current value.- Parameters:
previous
- The previous value.
-
getPrevious
Gets the previous value that is compared with the current value.- Returns:
- previous The previous value.
-