public class DStateInteger extends DState<java.lang.Integer>
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
convertToString(java.lang.Integer value)
Convert the provided object to string.
|
java.util.Optional<java.lang.Integer> |
getFrom(java.lang.String value)
Get an optional from the provided string.
|
int |
getMax() |
int |
getMin() |
java.util.Collection<java.lang.Integer> |
getValues()
Get all the valid values that this state could take on.
|
static DStateInteger |
of(java.lang.String id,
int min,
int max)
Create a new DStateInteger with a range from the min to max, inclusive.
|
public final int getMin()
public final int getMax()
public java.lang.String convertToString(java.lang.Integer value)
DStateconvertToString in class DState<java.lang.Integer>value - The value that needs converting.public java.util.Optional<java.lang.Integer> getFrom(java.lang.String value)
DStatepublic java.util.Collection<java.lang.Integer> getValues()
DStatepublic static DStateInteger of(java.lang.String id, int min, int max)
id - min - The minimum number that this state can take on.max - The maximum number that this state can take on.