S
- The type this Binding converts to and from a Stringpublic class JodaConvertStringBinding<S> extends Object implements Binding<S,String>, org.joda.convert.StringConverter<S>
StringConverter
Constructor and Description |
---|
JodaConvertStringBinding(Class<S> boundClass,
org.joda.convert.StringConverter<S> converter)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
S |
convertFromString(Class<? extends S> boundClass,
String inputString) |
String |
convertToString(S object) |
Class<S> |
getBoundClass()
Obtain the bound class
|
Class<String> |
getTargetClass()
Obtain the bound class
|
String |
marshal(S object)
Converts to the given object from the specified object
|
S |
unmarshal(String inputString)
Converts from the given String into the specified object
|
public JodaConvertStringBinding(Class<S> boundClass, org.joda.convert.StringConverter<S> converter)
boundClass
- The class that can be converted to and from a Stringconverter
- The StringConverter instance to be wrappedpublic String marshal(S object)
marshal
in interface ToMarshaller<S,String>
object
- Object to transform, not nullpublic S unmarshal(String inputString)
unmarshal
in interface FromUnmarshaller<S,String>
inputString
- Object to transform, not nullpublic String convertToString(S object)
convertToString
in interface org.joda.convert.ToStringConverter<S>
public S convertFromString(Class<? extends S> boundClass, String inputString)
convertFromString
in interface org.joda.convert.FromStringConverter<S>
public Class<S> getBoundClass()
getBoundClass
in interface FromUnmarshaller<S,String>
getBoundClass
in interface ToMarshaller<S,String>
public Class<String> getTargetClass()
getTargetClass
in interface FromUnmarshaller<S,String>
getTargetClass
in interface ToMarshaller<S,String>
Copyright © 2010–2018 Jadira Systems. All rights reserved.