Package com.jidesoft.converter
Class MultipleEnumConverter
java.lang.Object
com.jidesoft.converter.ArrayConverter
com.jidesoft.converter.MultipleEnumConverter
- All Implemented Interfaces:
ObjectConverter
MultipleEnumConverter is a special ArrayConverter that converts a string to/from array. Each element in the element
is converted to the object using a specified EnumConverter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
fromString
(int i, String s, ConverterContext context) fromString
(String string, ConverterContext context) Converts from String to an object.Gets the converter context of this converter.Class
<?> getType()
void
setEnumConverter
(EnumConverter enumConverter) boolean
supportFromString
(String string, ConverterContext context) If it supports fromString.boolean
supportToString
(Object object, ConverterContext context) If it supports toString method.protected String
toString
(int i, Object o, ConverterContext context) toString
(Object object, ConverterContext context) Converts from object to String based on current locale.Methods inherited from class com.jidesoft.converter.ArrayConverter
arrayFromString, arrayToString, getElementClass, isUseTokenizer, setUseTokenizer
-
Constructor Details
-
MultipleEnumConverter
-
-
Method Details
-
getType
-
getEnumConverter
-
setEnumConverter
-
toString
Description copied from interface:ObjectConverter
Converts from object to String based on current locale.- Parameters:
object
- object to be convertedcontext
- converter context to be used- Returns:
- the String
-
supportToString
Description copied from interface:ObjectConverter
If it supports toString method.- Parameters:
object
- object to be convertedcontext
- converter context to be used- Returns:
- true if supports toString
-
fromString
Description copied from interface:ObjectConverter
Converts from String to an object.- Parameters:
string
- the stringcontext
- context to be converted- Returns:
- the object converted from string
-
supportFromString
Description copied from interface:ObjectConverter
If it supports fromString.- Parameters:
string
- the stringcontext
- context to be converted- Returns:
- true if it supports
-
toString
- Overrides:
toString
in classArrayConverter
-
fromString
- Overrides:
fromString
in classArrayConverter
-
getContext
Gets the converter context of this converter. The name of the context is the name of the converter where you pass in to EnumConverter's constructor.- Returns:
- the converter context of this converter.
-