Top Inners Fields Constructors Methods
com.ibm.icu.impl.units

public Class MeasureUnitImpl

extends Object
Class Inheritance
Imports
java.math.BigDecimal, java.util.ArrayList, .Collections, .Comparator, com.ibm.icu.util.BytesTrie, .CharsTrie, .CharsTrieBuilder, .ICUCloneNotSupportedException, .MeasureUnit, .StringTrieBuilder

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
public static enum
pack-priv static class
public static class
pack-priv static class
public static enum
pack-priv static class
public static class

Field Summary

Modifier and TypeField and Description
private MeasureUnit.Complexity
complexity

The complexity, either SINGLE, COMPOUND, or MIXED.

private String
identifier

The full unit identifier.

private final ArrayList<SingleUnitImpl>
singleUnits

The list of single units.

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if a new item was added. If unit is the dimensionless unit, it is never added: the return value will always be false.
appendSingleUnit
(SingleUnitImpl singleUnit)

Mutates this MeasureUnitImpl to append a single unit.

public void
applyDimensionality(int dimensionality)

Applies dimensionality to all the internal single units.

public MeasureUnit
build()

Transform this MeasureUnitImpl into a MeasureUnit, simplifying if possible.

public MeasureUnitImpl
copy()

public MeasureUnitImpl
copyAndSimplify()

Returns a simplified version of the unit.

public ArrayList<MeasureUnitImpl.MeasureUnitImplWithIndex>
public static MeasureUnitImpl
forCurrencyCode(String currencyCode)

Used for currency units.

public static MeasureUnitImpl

Returns:

A newly parsed object.
forIdentifier
(String
The unit identifier string.
identifier
)

Parse a unit identifier into a MeasureUnitImpl.

public MeasureUnit.Complexity
public String
getIdentifier()

Returns the CLDR unit identifier and null if not computed.

public SingleUnitImpl

Returns:

SingleUnitImpl
getSingleUnitImpl
()

public ArrayList<SingleUnitImpl>
getSingleUnits()

Returns the list of simple units.

public void
serialize()

Normalizes the MeasureUnitImpl and generates the identifier string in place.

public void
public void
takeReciprocal()

Mutates this MeasureUnitImpl to take the reciprocal.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait