UnitsConverterFactory class final

An ICU4X Units Converter Factory object, capable of creating converters a UnitsConverter for converting between two MeasureUnits.

Also, it can parse the CLDR unit identifier (e.g. meter-per-square-second) and get the MeasureUnit.

See the Rust documentation for ConverterFactory for more information.

Implemented types

Constructors

UnitsConverterFactory.new()
Construct a new UnitsConverterFactory instance using compiled data.
factory
UnitsConverterFactory.withProvider(DataProvider provider)
Construct a new UnitsConverterFactory instance using a particular data source.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

converter(MeasureUnit from, MeasureUnit to) UnitsConverter?
Creates a new UnitsConverter from the input and output MeasureUnits. Returns nothing if the conversion between the two units is not possible. For example, conversion between meter and second is not possible.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited