public static final class LSingle.MutCompSingle<T extends Comparable<T>> extends LSingle.AbstractSingle<T> implements LSingle.ComparableSingle<T>
Mutable, comparable tuple.
LSingle.AbstractSingle<T>, LSingle.ComparableSingle<T extends Comparable<T>>, LSingle.ImmCompSingle<T extends Comparable<T>>, LSingle.ImmSingle<T>, LSingle.MutCompSingle<T extends Comparable<T>>, LSingle.MutSingle<T>LTuple.Void| Constructor and Description |
|---|
MutCompSingle(T a) |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<T>> |
copyOf(LSingle<T> tuple) |
static <T extends Comparable<T>> |
of(T a) |
void |
reset() |
LSingle.MutCompSingle<T> |
setValue(T value) |
LSingle.MutCompSingle<T> |
setValueIf(LBiPredicate<T,T> predicate,
T value)
Sets new value if predicate predicate(current, newValue) OR current::something(newValue) is true.
|
LSingle.MutCompSingle<T> |
setValueIf(LPredicate<T> predicate,
T value)
Sets value if predicate(current) OR current::predicate is true
|
LSingle.MutCompSingle<T> |
setValueIf(T value,
LBiPredicate<T,T> predicate)
Sets new value if predicate predicate(newValue, current) OR newValue::something(current) is true.
|
LSingle.MutCompSingle<T> |
setValueIfArg(T value,
LPredicate<T> predicate)
Sets value if predicate(newValue) OR newValue::predicate is true
|
<R> LSingle.MutCompSingle<T> |
setValueIfArgNotNull(R arg,
LFunction<R,T> func)
Sets value derived from non-null argument, only if argument is not null.
|
T |
value() |
LSingle.MutCompSingle<T> |
value(T value) |
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTopublic MutCompSingle(T a)
public static <T extends Comparable<T>> LSingle.MutCompSingle<T> of(T a)
public static <T extends Comparable<T>> LSingle.MutCompSingle<T> copyOf(LSingle<T> tuple)
public LSingle.MutCompSingle<T> value(T value)
public LSingle.MutCompSingle<T> setValue(T value)
public LSingle.MutCompSingle<T> setValueIfArg(T value, LPredicate<T> predicate)
Sets value if predicate(newValue) OR newValue::predicate is true
public <R> LSingle.MutCompSingle<T> setValueIfArgNotNull(R arg, LFunction<R,T> func)
Sets value derived from non-null argument, only if argument is not null.
public LSingle.MutCompSingle<T> setValueIf(LPredicate<T> predicate, T value)
Sets value if predicate(current) OR current::predicate is true
public LSingle.MutCompSingle<T> setValueIf(T value, LBiPredicate<T,T> predicate)
Sets new value if predicate predicate(newValue, current) OR newValue::something(current) is true.
public LSingle.MutCompSingle<T> setValueIf(LBiPredicate<T,T> predicate, T value)
Sets new value if predicate predicate(current, newValue) OR current::something(newValue) is true.
public void reset()
Copyright © 2019. All rights reserved.