org.apache.camel.dataformat.bindy.format
Class EnumFormat<T extends Enum<T>>
java.lang.Object
org.apache.camel.dataformat.bindy.format.EnumFormat<T>
- All Implemented Interfaces:
- Format<T>
public class EnumFormat<T extends Enum<T>>
- extends Object
- implements Format<T>
Method Summary |
String |
format(T object)
Formats the object into a String |
T |
parse(String string)
Parses a String into an object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumFormat
public EnumFormat(Class<T> clazz)
format
public String format(T object)
throws Exception
- Description copied from interface:
Format
- Formats the object into a String
- Specified by:
format
in interface Format<T extends Enum<T>>
- Parameters:
object
- the object
- Returns:
- formatted as a String
- Throws:
Exception
- can be thrown
parse
public T parse(String string)
throws Exception
- Description copied from interface:
Format
- Parses a String into an object
- Specified by:
parse
in interface Format<T extends Enum<T>>
- Parameters:
string
- the string
- Returns:
- T the object
- Throws:
Exception
- can be thrown
Apache Camel