T
- Type of value, see get()
, getType()
, and validate(Object)
.public interface FormField<T>
Modifier and Type | Method and Description |
---|---|
T |
get()
Provides the current value of the field.
|
String |
getName()
Returns the name of the field.
|
Class<T> |
getType()
Get the type of the field's value.
|
boolean |
isDefault()
Indicates that the value is set to default.
|
boolean |
isEmpty()
Indicates that the value of this field is empty.
|
boolean |
isSet()
Indicates that the value of this field is set.
|
void |
set(Object value)
Set the value of this field.
|
void |
setToDefault()
Set the field to its default value.
|
void |
validate(T value)
Validate the given value.
|
String getName()
Class<T> getType()
boolean isSet()
true
, iff field is set.boolean isEmpty()
true
, iff field evaluates to empty.boolean isDefault()
true
, iff field is set to default.@Nullable T get()
void set(Object value) throws InappropriateValueException, UnsupportedOperationException
value
- The value to be set.InappropriateValueException
- If the given value is not appropriate for this field.UnsupportedOperationException
- If the field does not support setting its value.validate(Object)
void setToDefault() throws UnsupportedOperationException
UnsupportedOperationException
- If the field does not support setting its value.void validate(T value) throws InappropriateValueException
value
- The value to validate.InappropriateValueException
- If the value is not valid.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500