org.apache.activemq.util
Class MemoryIntPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.apache.activemq.util.MemoryIntPropertyEditor
All Implemented Interfaces:
PropertyEditor

public class MemoryIntPropertyEditor
extends PropertyEditorSupport

Used by xbean to set integers.

Important: Do not use this for other purposes than xbean, as property editors are not thread safe, and they are slow to use.

Converts string values like "20 Mb", "1024kb", and "1g" to int values in bytes.


Constructor Summary
MemoryIntPropertyEditor()
           
 
Method Summary
 String getAsText()
           
 void setAsText(String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryIntPropertyEditor

public MemoryIntPropertyEditor()
Method Detail

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Throws:
IllegalArgumentException

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.