public abstract class RangedProperty<T> extends Property<T>
| Constructor and Description |
|---|
RangedProperty(T value,
T minValue,
T maxValue,
PropertyGuiType guiType)
Constructs a new Property with minimum and maximum value constraints.
|
| Modifier and Type | Method and Description |
|---|---|
PropertyGuiType |
getGuiType()
Gets the
PropertyGuiType to specify the type of GUI button this property should be used with. |
T |
getMaxValue()
Gets the maximum value for the range of values.
|
T |
getMinValue()
Gets the minimum value for the range of values.
|
abstract java.util.function.Predicate<java.lang.String> |
getStringPredicate()
Gets the predicate used to constrain the minimum/maximum value when used with GUI fields.
|
equals, getFormatter, getType, getValue, hashCode, setValue, visitEntryValue, visitFactory, visitGui, visitNameFormatterpublic RangedProperty(T value, T minValue, T maxValue, PropertyGuiType guiType)
value - The initial property value.minValue - The minimum property value.maxValue - The maximum property value.guiType - The PropertyGuiType.public abstract java.util.function.Predicate<java.lang.String> getStringPredicate()
public T getMinValue()
public T getMaxValue()
public PropertyGuiType getGuiType()
PropertyGuiType to specify the type of GUI button this property should be used with.PropertyGuiType.