T
- type of inputpublic class ErrorInput<T> extends java.lang.Object implements UnmodifiableInput, Input<T>
Constructor and Description |
---|
ErrorInput(java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(InputVisitor<R> vis) |
void |
addValidator(FieldValidator<T> val)
Add a
FieldValidator to this input |
T |
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 |
getLabel()
generate the text to be presented to the user
|
java.lang.String |
getPrettyString(T value)
Convert a value into a user friendly string.
|
java.lang.String |
getString(T value)
convert a value of the correct type for this input into a String.
|
T |
getValue()
get the current value of the Object created by this selector.
|
boolean |
isEmpty()
Is the input empty.
|
void |
removeValidator(FieldValidator<T> val)
Remove a
FieldValidator from this input |
void |
setKey(java.lang.String key)
Set the key used by this Selector
|
T |
setValue(T v)
set the value of this selector.
|
void |
validate()
Check the validity of the current state of the Object.
|
public java.lang.String getLabel()
UnmodifiableInput
getLabel
in interface UnmodifiableInput
public T convert(java.lang.Object v) throws TypeError
Input
public java.lang.String getKey()
Input
public java.lang.String getPrettyString(T value)
Input
getPrettyString
in interface Input<T>
ListInput
public java.lang.String getString(T value)
Input
getString
in interface Input<T>
ParseInput
public T getValue()
Input
public void setKey(java.lang.String key)
Input
public T setValue(T v) throws TypeError
Input
public boolean isEmpty()
Input
public void validate() throws FieldException
Input
validate
in interface Input<T>
FieldException
public <R> R accept(InputVisitor<R> vis) throws java.lang.Exception
public void addValidator(FieldValidator<T> val)
Input
FieldValidator
to this inputaddValidator
in interface Input<T>
public void removeValidator(FieldValidator<T> val)
Input
FieldValidator
from this inputremoveValidator
in interface Input<T>