public final class Converter<TYPE> extends java.lang.Object implements IConverter<TYPE>
Constructor and Description |
---|
Converter(IObjectStringConverter<TYPE> objectStringConverter,
IStringObjectConverter<TYPE> stringObjectConverter) |
Modifier and Type | Method and Description |
---|---|
TYPE |
convertToObject(java.lang.String string)
Converts an string input to an object.
|
java.lang.String |
convertToString(TYPE value)
Converts the value to an string representation
|
java.lang.String |
getAcceptingRegExp()
Gets the regular expression that describes the valid inputs.
|
java.lang.String |
getDescription(TYPE value)
Gets an description for an value
|
IInputVerifier |
getInputVerifier()
Gets an input verifier that verifies the input.
|
ITextMask |
getMask()
Gets a mask if the input should be masked.
|
IValidator<java.lang.String> |
getStringValidator()
Gets a validator that will be used to validate the string input.
|
java.lang.String |
toString() |
public Converter(IObjectStringConverter<TYPE> objectStringConverter, IStringObjectConverter<TYPE> stringObjectConverter)
public TYPE convertToObject(java.lang.String string)
IStringObjectConverter
convertToObject
in interface IStringObjectConverter<TYPE>
string
- The string to convert.public java.lang.String convertToString(TYPE value)
IObjectStringConverter
convertToString
in interface IObjectStringConverter<TYPE>
value
- The value to convertpublic java.lang.String getDescription(TYPE value)
IObjectStringConverter
getDescription
in interface IObjectStringConverter<TYPE>
value
- the value to get the description forpublic IValidator<java.lang.String> getStringValidator()
IStringObjectConverter
getStringValidator
in interface IStringObjectConverter<TYPE>
public IInputVerifier getInputVerifier()
IStringObjectConverter
IInputVerifier
's
if possible because SPI implementations that use 'AJAX' can implement client side verification easier.getInputVerifier
in interface IStringObjectConverter<TYPE>
public java.lang.String getAcceptingRegExp()
IStringObjectConverter
IInputVerifier
's
if possible because SPI implementations that uses e.g 'AJAX' can implement client side verification easier.
REMARK: Implementors must not assume that the regular expression will be used on all platformsgetAcceptingRegExp
in interface IStringObjectConverter<TYPE>
public ITextMask getMask()
IStringObjectConverter
getMask
in interface IStringObjectConverter<TYPE>
public java.lang.String toString()
toString
in class java.lang.Object
Siehe auch Jowidgets Nutzerhandbuch