|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
V - The value type this converter supports.L - The literal type of the lexical form of the value.public interface Converter<V,L>
Indicates an object that can convert a value from and to its lexical form.
Resources#CONVERTER_INVALID_VALUE_MESSAGE_RESOURCE_REFERENCE| Field Summary | |
|---|---|
static java.lang.String |
INVALID_VALUE_MESSAGE_PROPERTY
The invalid value message bound property. |
| Method Summary | |
|---|---|
V |
convertLiteral(L literal)
Converts a literal representation of a value from the lexical space into a value in the value space. |
L |
convertValue(V value)
Converts a value from the value space to a literal value in the lexical space. |
java.lang.String |
getInvalidValueMessage()
|
GuiseSession |
getSession()
|
boolean |
isEquivalent(V value,
L literal)
Determines if the given literal in the lexical space is a valid representation of the given value in the value space. |
boolean |
isValidLiteral(L literal)
Determines whether a given literal value in the lexical space can be converted to a value in the value space. |
void |
setInvalidValueMessage(java.lang.String newInvalidValueMessage)
Sets the text of the invalid value message. |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
static final java.lang.String INVALID_VALUE_MESSAGE_PROPERTY
| Method Detail |
|---|
java.lang.String getInvalidValueMessage()
void setInvalidValueMessage(java.lang.String newInvalidValueMessage)
newInvalidValueMessage - The new text of the invalid value message, which may include a resource reference.
java.lang.NullPointerException - if the given message is null.INVALID_VALUE_MESSAGE_PROPERTYGuiseSession getSession()
V convertLiteral(L literal)
throws ConversionException
literal - The literal value in the lexical space to convert.
null if the given literal is null.
ConversionException - if the literal value cannot be converted.
L convertValue(V value)
throws ConversionException
value - The value in the value space to convert.
null if the given literal is null.
ConversionException - if the value cannot be converted.boolean isValidLiteral(L literal)
literal - The literal value to validate.
true if the literal is valid, else false.
boolean isEquivalent(V value,
L literal)
value - The value to compare.literal - The literal value in the lexical space to compare with the value after conversion.
true if the given literal in the lexical space is a valid representation of the given value in the value space.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||