info.informatica.text
Class UnitParser

java.lang.Object
  extended by info.informatica.text.UnitParser

public class UnitParser
extends Object

Parses a string that contains a number and an unit (e.g. "12cm").

Author:
Carlos Amengual

Constructor Summary
UnitParser(String value)
           
 
Method Summary
 String getUnitName()
          Gets the unit name.
 String getUnparsedValue()
          Gets the unparsed string containing this vale+unit.
 String getValue()
          Gets the value, as a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitParser

public UnitParser(String value)
Method Detail

getUnparsedValue

public String getUnparsedValue()
Gets the unparsed string containing this vale+unit.

Returns:
the unparsed string

getValue

public String getValue()
Gets the value, as a string.

Returns:
the value.

getUnitName

public String getUnitName()
Gets the unit name.

Returns:
the unit.