Class MapEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.apache.mina.integration.beans.AbstractPropertyEditor
-
- org.apache.mina.integration.beans.MapEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor
- Direct Known Subclasses:
PropertiesEditor
public class MapEditor extends AbstractPropertyEditor
APropertyEditorwhich converts aStringinto aCollectionand vice versa.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMapEditor.TokenType
-
Constructor Summary
Constructors Constructor Description MapEditor(java.lang.Class<?> keyType, java.lang.Class<?> valueType)Creates a new DateEditor instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.beans.PropertyEditorgetKeyEditor()private java.beans.PropertyEditorgetValueEditor()protected java.util.Map<java.lang.Object,java.lang.Object>newMap()protected java.lang.StringtoText(java.lang.Object value)Returns a String representation of the given valueprotected java.lang.ObjecttoValue(java.lang.String text)Returns an instance from a String representation of an object-
Methods inherited from class org.apache.mina.integration.beans.AbstractPropertyEditor
defaultText, defaultValue, getAsText, getValue, setAsText, setTrimText, setValue
-
-
-
-
Field Detail
-
ELEMENT
static final java.util.regex.Pattern ELEMENT
-
keyType
private final java.lang.Class<?> keyType
-
valueType
private final java.lang.Class<?> valueType
-
NO_VALUE
private static final java.lang.String NO_VALUE
- See Also:
- Constant Field Values
-
NO_KEY
private static final java.lang.String NO_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getKeyEditor
private java.beans.PropertyEditor getKeyEditor()
-
getValueEditor
private java.beans.PropertyEditor getValueEditor()
-
toText
protected final java.lang.String toText(java.lang.Object value)
Description copied from class:AbstractPropertyEditorReturns a String representation of the given value- Specified by:
toTextin classAbstractPropertyEditor- Parameters:
value- The value- Returns:
- A String representation of the value
-
toValue
protected final java.lang.Object toValue(java.lang.String text)
Description copied from class:AbstractPropertyEditorReturns an instance from a String representation of an object- Specified by:
toValuein classAbstractPropertyEditor- Parameters:
text- The String representation to convert- Returns:
- A instance of an object
-
newMap
protected java.util.Map<java.lang.Object,java.lang.Object> newMap()
-
-