org.apache.mina.integration.beans
Class NumberEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.apache.mina.integration.beans.AbstractPropertyEditor
          extended by org.apache.mina.integration.beans.NumberEditor
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
ByteEditor, DoubleEditor, FloatEditor, IntegerEditor, LongEditor, ShortEditor

public class NumberEditor
extends AbstractPropertyEditor

A PropertyEditor which converts a String into a Number and vice versa.

Version:
$Revision: 606105 $, $Date: 2007-12-21 06:59:58 +0100 (ven, 21 déc 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
NumberEditor()
           
 
Method Summary
protected  Object defaultValue()
           
protected  String toText(Object value)
           
protected  Object toValue(String text)
           
protected  Object toValue(String text, int radix)
           
 
Methods inherited from class org.apache.mina.integration.beans.AbstractPropertyEditor
defaultText, getAsText, getValue, setAsText, setTrimText, setValue
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberEditor

public NumberEditor()
Method Detail

toText

protected final String toText(Object value)
Specified by:
toText in class AbstractPropertyEditor

toValue

protected final Object toValue(String text)
                        throws IllegalArgumentException
Specified by:
toValue in class AbstractPropertyEditor
Throws:
IllegalArgumentException

toValue

protected Object toValue(String text,
                         int radix)

defaultValue

protected Object defaultValue()
Overrides:
defaultValue in class AbstractPropertyEditor


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.