Package org.djunits.unit
Class SIUnit
- java.lang.Object
-
- org.djunits.unit.Unit<SIUnit>
-
- org.djunits.unit.SIUnit
-
- All Implemented Interfaces:
Serializable,Cloneable
public class SIUnit extends Unit<SIUnit>
SIUnit describes a unit with arbitrary SI dimensions for which no predefined unit exists.Copyright (c) 2019-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.djunits.unit.Unit
Unit.Builder<U extends Unit<U>>
-
-
Constructor Summary
Constructors Constructor Description SIUnit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()static SIUnitof(String siString)Instantiate an SI unit 'of' a String.static SIUnitof(SIDimensions siDimensions)Instantiate an SI unit 'of' a SIDimensions.StringtoString()-
Methods inherited from class org.djunits.unit.Unit
build, clone, deriveLinear, deriveLinear, deriveLinear, derivePerSI, deriveSI, deriveSI, deriveSIKilo, getAbbreviations, getDefaultDisplayAbbreviation, getDefaultTextualAbbreviation, getId, getName, getQuantity, getScale, getStandardUnit, getUnit, getUnitSystem, isBaseSIUnit, isGenerated, lookupOrCreateUnitWithSIDimensions, makeBuilder
-
-
-
-
Method Detail
-
of
public static SIUnit of(String siString) throws UnitException
Instantiate an SI unit 'of' a String.- Parameters:
siString- String; the SI string, e.g., "kgm/s2"- Returns:
- the SIUnit based on the SI dimensionality
- Throws:
UnitException- when the SI string is not according to the rules
-
of
public static SIUnit of(SIDimensions siDimensions) throws UnitException
Instantiate an SI unit 'of' a SIDimensions.- Parameters:
siDimensions- SIDimensions; the SI dimensions- Returns:
- the SIUnit based on the SI dimensionality
- Throws:
UnitException- when the SI string is not according to the rules
-
-