Package org.djunits.unit.si
Class SIPrefix
java.lang.Object
org.djunits.unit.si.SIPrefix
- All Implemented Interfaces:
Serializable
SIPrefix contains information about one prefix, such as M for mega with the value 1.0E6.
Copyright (c) 2019-2024 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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the default display prefix.Retrieve the default textual prefix.double
Retrieve the factor.Retrieve the prefix name.toString()
-
Constructor Details
-
SIPrefix
public SIPrefix(String defaultTextualPrefix, String prefixName, double factor, String defaultDisplayPrefix) Construct an SI prefix.- Parameters:
defaultTextualPrefix
- String; the prefix abbreviation, duch as "M" for mega and "da" for decaprefixName
- String; the prefix name such as "mega" or "deca"factor
- double; the factor that the SI prefix represents, such as 1.0E6 for megadefaultDisplayPrefix
- the display prefix; "μ" for micro
-
SIPrefix
Construct an SI prefix with the defaultDisplayPrefix equal to the defaultTextualPrefix.- Parameters:
defaultTextualPrefix
- String; the prefix abbreviation, duch as "M" for mega and "da" for decaprefixName
- String; the prefix name such as "mega" or "deca"factor
- double; the factor that the SI prefix represents, such as 1.0E6 for mega
-
-
Method Details
-
getDefaultTextualPrefix
Retrieve the default textual prefix.- Returns:
- String; the default textual prefix
-
getPrefixName
Retrieve the prefix name.- Returns:
- String; the prefix name
-
getFactor
public double getFactor()Retrieve the factor.- Returns:
- double; the factor
-
getDefaultDisplayPrefix
Retrieve the default display prefix.- Returns:
- String; the default display prefix
-
toString
-