JScience v4.3

javax.measure
Class MeasureFormat

java.lang.Object
  extended by java.text.Format
      extended by javax.measure.MeasureFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public abstract class MeasureFormat
extends java.text.Format

This class provides the interface for formatting and parsing measures.

As a minimum, instances of this class should be able to parse/format measure using CompoundUnit.

Version:
4.2, August 26, 2007
Author:
Jean-Marie Dautelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
java.text.Format.Field
 
Constructor Summary
MeasureFormat()
           
 
Method Summary
static MeasureFormat getInstance()
          Returns the measure format for the default locale.
static MeasureFormat getInstance(java.text.NumberFormat numberFormat, UnitFormat unitFormat)
          Returns the measure format using the specified number format and unit format (the number and unit are separated by a space).
 
Methods inherited from class java.text.Format
clone, format, format, formatToCharacterIterator, parseObject, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasureFormat

public MeasureFormat()
Method Detail

getInstance

public static MeasureFormat getInstance()
Returns the measure format for the default locale.

Returns:
getInstance(Number.getInstance(), Unit.getInstance())

getInstance

public static MeasureFormat getInstance(java.text.NumberFormat numberFormat,
                                        UnitFormat unitFormat)
Returns the measure format using the specified number format and unit format (the number and unit are separated by a space).

Parameters:
numberFormat - the number format.
unitFormat - the unit format.
Returns:
the corresponding format.

JScience v4.3

Copyright © 2006 JScience.