public class TimeUnitAdapter extends XmlAdapter<java.lang.String,java.util.concurrent.TimeUnit>
Constructor and Description |
---|
TimeUnitAdapter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
marshal(java.util.concurrent.TimeUnit t)
Convert a bound type to a value type.
|
java.util.concurrent.TimeUnit |
unmarshal(java.lang.String s)
Convert a value type to a bound type.
|
public java.util.concurrent.TimeUnit unmarshal(java.lang.String s) throws java.lang.Exception
XmlAdapter
unmarshal
in class XmlAdapter<java.lang.String,java.util.concurrent.TimeUnit>
s
- The value to be converted. Can be null.java.lang.Exception
- if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler
.public java.lang.String marshal(java.util.concurrent.TimeUnit t) throws java.lang.Exception
XmlAdapter
marshal
in class XmlAdapter<java.lang.String,java.util.concurrent.TimeUnit>
t
- The value to be convereted. Can be null.java.lang.Exception
- if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler
.