T
- The type of comparableM
- The API data manipulatorI
- The API immutable data manipulatorpublic abstract class AbstractBoundedComparableData<T extends Comparable<T>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>> extends AbstractSingleData<T,M,I>
DataManipulator
that deals
specifically with a MutableBoundedValue
. Similar to
AbstractSingleData
in that it focuses on a single value,
it adds the certainty that the value can only accept values of which
the bounds are met.Modifier and Type | Field and Description |
---|---|
protected Comparator<T> |
comparator |
protected T |
defaultValue |
protected T |
lowerBound |
protected T |
upperBound |
usedKey, value
Modifier | Constructor and Description |
---|---|
protected |
AbstractBoundedComparableData(Key<MutableBoundedValue<T>> usedKey,
T value,
T lowerBound,
T upperBound,
Comparator<T> comparator) |
protected |
AbstractBoundedComparableData(Key<MutableBoundedValue<T>> usedKey,
T value,
T defaultValue,
T lowerBound,
T upperBound,
Comparator<T> comparator) |
protected |
AbstractBoundedComparableData(T value,
Key<MutableBoundedValue<T>> usedKey,
Comparator<T> comparator,
T lowerBound,
T upperBound,
T defaultValue)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected MutableBoundedValue<T> |
getValueGetter()
Gets the
Value as a method since this manipulator only focuses
on a single value. |
int |
hashCode() |
M |
setValue(T value)
A simple setter for usage with a
Consumer for
the AbstractData.registerFieldSetter(Key, Consumer) method. |
DataContainer |
toContainer()
Serializes this object into a comprehensible
DataContainer . |
asImmutable, fillContainer, get, getValue, registerGettersAndSetters, supports
getKeys, getValue, getValues, registerFieldGetter, registerFieldSetter, registerKeyValue, set, transform
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
copy, fill, fill, from, set, set, set
getContentVersion
getOrElse, getOrNull, require, supports
protected final Comparator<T extends Comparable<T>> comparator
protected final T extends Comparable<T> lowerBound
protected final T extends Comparable<T> upperBound
protected final T extends Comparable<T> defaultValue
@Deprecated protected AbstractBoundedComparableData(T value, Key<MutableBoundedValue<T>> usedKey, Comparator<T> comparator, T lowerBound, T upperBound, T defaultValue)
AbstractBoundedComparableData(Key, Comparable, Comparable, Comparable, Comparable, Comparator)
instead.protected AbstractBoundedComparableData(Key<MutableBoundedValue<T>> usedKey, T value, T lowerBound, T upperBound, Comparator<T> comparator)
protected AbstractBoundedComparableData(Key<MutableBoundedValue<T>> usedKey, T value, T defaultValue, T lowerBound, T upperBound, Comparator<T> comparator)
protected MutableBoundedValue<T> getValueGetter()
AbstractSingleData
Value
as a method since this manipulator only focuses
on a single value.getValueGetter
in class AbstractSingleData<T extends Comparable<T>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>
public M setValue(T value)
AbstractSingleData
Consumer
for
the AbstractData.registerFieldSetter(Key, Consumer)
method.setValue
in class AbstractSingleData<T extends Comparable<T>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>
value
- The valuepublic DataContainer toContainer()
DataSerializable
DataContainer
.toContainer
in interface DataSerializable
toContainer
in class AbstractData<M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>
public int hashCode()
hashCode
in class AbstractSingleData<T extends Comparable<T>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>
public boolean equals(Object obj)
equals
in class AbstractSingleData<T extends Comparable<T>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>