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