T
- The type of comparable elementI
- The immutable data manipulator typeM
- The mutable data manipulator typepublic abstract class AbstractImmutableBoundedComparableData<T extends Comparable<T>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,M>,M extends org.spongepowered.api.data.manipulator.DataManipulator<M,I>> extends AbstractImmutableSingleData<T,I,M>
ImmutableDataManipulator
that focuses solely on an
ImmutableBoundedValue
as it's Value
return type. The
advantage is that this type of ImmutableDataManipulator
can easily
be cached in the ImmutableDataCachingUtil
.Modifier and Type | Field and Description |
---|---|
protected Comparator<T> |
comparator |
protected T |
lowerBound |
protected T |
upperBound |
usedKey, value
Modifier | Constructor and Description |
---|---|
protected |
AbstractImmutableBoundedComparableData(Class<I> immutableClass,
T value,
org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<T>> usedKey,
Comparator<T> comparator,
Class<? extends M> mutableClass,
T lowerBound,
T upperBound) |
Modifier and Type | Method and Description |
---|---|
M |
asMutable() |
int |
compareTo(I o) |
protected org.spongepowered.api.data.value.immutable.ImmutableValue<?> |
getValueGetter() |
get, getKeys, getValue, registerGetters, supports, toContainer
copy, equals, getValue, getValues, hashCode, registerFieldGetter, registerKeyValue, with
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
protected final Comparator<T extends Comparable<T>> comparator
protected final T extends Comparable<T> lowerBound
protected final T extends Comparable<T> upperBound
protected AbstractImmutableBoundedComparableData(Class<I> immutableClass, T value, org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<T>> usedKey, Comparator<T> comparator, Class<? extends M> mutableClass, T lowerBound, T upperBound)
protected org.spongepowered.api.data.value.immutable.ImmutableValue<?> getValueGetter()
getValueGetter
in class AbstractImmutableSingleData<T extends Comparable<T>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,M>,M extends org.spongepowered.api.data.manipulator.DataManipulator<M,I>>
public M asMutable()
asMutable
in interface org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,M>,M extends org.spongepowered.api.data.manipulator.DataManipulator<M,I>>
asMutable
in class AbstractImmutableSingleData<T extends Comparable<T>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,M>,M extends org.spongepowered.api.data.manipulator.DataManipulator<M,I>>
public int compareTo(I o)