Class Units

java.lang.Object
org.eclipse.esmf.metamodel.Units

public class Units extends Object
Enumeration of Units as defined in Recommendation 20 by the UNECE (United Nations Economic Commission for Europe).
  • Method Details

    • fromName

      public static Optional<Unit> fromName(String name, org.eclipse.esmf.samm.KnownVersion metaModelVersion)
      Returns the unit with a given name
    • fromName

      public static Optional<Unit> fromName(String name)
      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

      public static Optional<Unit> fromCode(String code)
      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

      public static Set<Unit> fromSymbol(String symbol)
      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

      public static Set<Unit> unitsWithQuantityKind(QuantityKind quantityKind)
      Returns all units of a given quantity kind