Package org.djunits.unit.si
Class SIPrefix
java.lang.Object
org.djunits.unit.si.SIPrefix
- All Implemented Interfaces:
Serializable
public class SIPrefix extends Object implements Serializable
SIPrefix contains information about one prefix, such as M for mega with the value 1.0E6.
Copyright (c) 2019-2019 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
-
Constructor Summary
Constructors Constructor Description SIPrefix(String defaultTextualPrefix, String prefixName, double factor)
Construct an SI prefix with the defaultDisplayPrefix equal to the defaultTextualPrefix.SIPrefix(String defaultTextualPrefix, String prefixName, double factor, String defaultDisplayPrefix)
Construct an SI prefix. -
Method Summary
Modifier and Type Method Description String
getDefaultDisplayPrefix()
Retrieve the default display prefix.String
getDefaultTextualPrefix()
Retrieve the default textual prefix.double
getFactor()
Retrieve the factor.String
getPrefixName()
Retrieve the prefix name.String
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
-