Skip to content
Last updated

API / geotoolkit / util / AbstractUnitFactory / AbstractUnitFactory

Class: AbstractUnitFactory

util.AbstractUnitFactory.AbstractUnitFactory

Abstract factory for unit factory

Hierarchy

Table of contents

Constructors
  • [new AbstractUnitFactory()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.abstractunitfactory.abstractunitfactory.md#new abstractunitfactory())
Methods

Contents

Constructors

new AbstractUnitFactory()

• new AbstractUnitFactory()

Methods

getClassName

▸ getClassName(): string

Returns

string


getTimeStamp

▸ Abstract getTimeStamp(): number

Returns the time stamp (version) of unit factory. This value will be updated whenever modification made.

Returns

number


getUnit

▸ Abstract getUnit(value, quantityType?, nullIfNotExist?): AbstractUnit

Returns an instance of unit based on specified information

Parameters

Name Type Description
valuestring | AbstractUnitrepresent the {string} name, {string} symbol or {AbstractUnit} unit to be created
Optional quantityTypestring[]expected quantity types
Optional nullIfNotExistbooleanreturn null if unit does not exist instead of returning a user-defined unit

Returns

AbstractUnit


getClassName

▸ Static getClassName(): string

Returns

string


getDefaultFactory

▸ Static getDefaultFactory(): UnitFactory

Returns instance of unit factory

Returns

UnitFactory

factory


setType

▸ Static setType(type): void

Returns instance of unit factory

Parameters

Name Type Description
typetypeof UnitFactoryfactory ctor

Returns

void