Package org.eclipse.esmf.metamodel
Class Units
java.lang.Object
org.eclipse.esmf.metamodel.Units
Enumeration of Units as defined in Recommendation 20 by the
UNECE (United Nations Economic Commission for Europe).
-
Method Summary
Modifier and TypeMethodDescriptionFinds the unit with a given codeFinds the unit with a given codeReturns the unit with a given nameReturns the unit with a given namefromSymbol(String symbol) Finds the units with a given symbol.fromSymbol(String symbol, org.eclipse.esmf.samm.KnownVersion metaModelVersion) Finds the units with a given symbol.unitsWithQuantityKind(QuantityKind quantityKind) Returns all units of a given quantity kindunitsWithQuantityKind(QuantityKind quantityKind, org.eclipse.esmf.samm.KnownVersion metaModelVersion) Returns all units of a given quantity kind
-
Method Details
-
fromName
public static Optional<Unit> fromName(String name, org.eclipse.esmf.samm.KnownVersion metaModelVersion) Returns the unit with a given name -
fromName
Returns the unit with a given name -
fromCode
public static Optional<Unit> fromCode(String code, org.eclipse.esmf.samm.KnownVersion metaModelVersion) Finds the unit with a given code -
fromCode
Finds the unit with a given code -
fromSymbol
public static Set<Unit> fromSymbol(String symbol, org.eclipse.esmf.samm.KnownVersion metaModelVersion) Finds the units with a given symbol. In most, but not all cases, this set will contain exactly one unit. -
fromSymbol
Finds the units with a given symbol. In most, but not all cases, this set will contain exactly one unit. -
unitsWithQuantityKind
public static Set<Unit> unitsWithQuantityKind(QuantityKind quantityKind, org.eclipse.esmf.samm.KnownVersion metaModelVersion) Returns all units of a given quantity kind -
unitsWithQuantityKind
Returns all units of a given quantity kind
-