Property.Value<T extends Comparable<T>>
Modifier and Type | Field and Description |
---|---|
private ImmutableSet<Integer> |
values |
Modifier | Constructor and Description |
---|---|
protected |
IntProperty(String name,
int min,
int max) |
Modifier and Type | Method and Description |
---|---|
int |
computeHashCode() |
boolean |
equals(Object object) |
Collection<Integer> |
getValues()
Returns all possible values the property can take.
|
String |
name(Integer integer) |
static IntProperty |
of(String name,
int min,
int max)
Creates an integer property.
|
Optional<Integer> |
parse(String name) |
createValue, createValue, getName, getType, getValueCodec, hashCode, stream, toString
private final ImmutableSet<Integer> values
protected IntProperty(String name, int min, int max)
public Collection<Integer> getValues()
public int computeHashCode()
computeHashCode
in class Property<Integer>
public static IntProperty of(String name, int min, int max)
min
must be non-negative and max
must be greater than min
.
Note that this method takes O(max
- min
) time as it computes all possible values during instantiation.
name
- the name of the propertymin
- the minimum value the property can takemax
- the maximum value the property can take