public class CharacterEditor
extends java.beans.PropertyEditorSupport
Character, to populate a property
of type Character or char from a String value.
Note that the JDK does not contain a default
property editor for char!
BeanWrapperImpl will register this
editor by default.
Also supports conversion from a Unicode character sequence; e.g.
u0041 ('A').
Character,
BeanWrapperImpl| Constructor and Description |
|---|
CharacterEditor(boolean allowEmpty)
Create a new CharacterEditor instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAsText() |
void |
setAsText(java.lang.String text) |
public CharacterEditor(boolean allowEmpty)
The "allowEmpty" parameter controls whether an empty String is to be
allowed in parsing, i.e. be interpreted as the null value when
text is being converted. If false,
an IllegalArgumentException will be thrown at that time.
allowEmpty - if empty strings are to be allowedpublic void setAsText(java.lang.String text)
throws java.lang.IllegalArgumentException
setAsText in interface java.beans.PropertyEditorsetAsText in class java.beans.PropertyEditorSupportjava.lang.IllegalArgumentExceptionpublic java.lang.String getAsText()
getAsText in interface java.beans.PropertyEditorgetAsText in class java.beans.PropertyEditorSupport