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()
UnmodifiableInputgetLabel in interface UnmodifiableInputpublic T convert(java.lang.Object v) throws TypeError
Inputpublic java.lang.String getKey()
Inputpublic java.lang.String getPrettyString(T value)
InputgetPrettyString in interface Input<T>ListInputpublic java.lang.String getString(T value)
InputgetString in interface Input<T>ParseInputpublic T getValue()
Inputpublic void setKey(java.lang.String key)
Inputpublic T setValue(T v) throws TypeError
Inputpublic boolean isEmpty()
Inputpublic void validate()
throws FieldException
Inputvalidate in interface Input<T>FieldExceptionpublic <R> R accept(InputVisitor<R> vis) throws java.lang.Exception
public void addValidator(FieldValidator<T> val)
InputFieldValidator to this inputaddValidator in interface Input<T>public void removeValidator(FieldValidator<T> val)
InputFieldValidator from this inputremoveValidator in interface Input<T>