V
- class of object Input generatespublic interface Input<V>
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(InputVisitor<R> vis) |
void |
addValidator(FieldValidator<V> val)
Add a
FieldValidator to this input |
V |
convert(java.lang.Object v)
Perform any supported type conversions to to generate a value of the
target type
|
java.lang.String |
getKey()
get the unique key for this selector
|
java.lang.String |
getPrettyString(V value)
Convert a value into a user friendly string.
|
java.lang.String |
getString(V value)
convert a value of the correct type for this input into a String.
|
V |
getValue()
get the current value of the Object created by this selector.
|
default boolean |
isEmpty()
Is the input empty.
|
void |
removeValidator(FieldValidator<V> val)
Remove a
FieldValidator from this input |
void |
setKey(java.lang.String key)
Set the key used by this Selector
|
V |
setValue(V v)
set the value of this selector.
|
void |
validate()
Check the validity of the current state of the Object.
|
java.lang.String getKey()
V getValue()
void setKey(java.lang.String key)
key
- V setValue(V v) throws TypeError
v
- TypeError
V convert(java.lang.Object v) throws TypeError
v
- Object inputTypeError
java.lang.String getString(V value)
value
- ParseInput
java.lang.String getPrettyString(V value)
value
- ListInput
void validate() throws FieldException
FieldException
<R> R accept(InputVisitor<R> vis) throws java.lang.Exception
java.lang.Exception
default boolean isEmpty()
void addValidator(FieldValidator<V> val)
FieldValidator
to this inputval
- void removeValidator(FieldValidator<V> val)
FieldValidator
from this inputval
-