Package org.djunits.unit.si
Class SIPrefix
java.lang.Object
org.djunits.unit.si.SIPrefix
SIPrefix contains information about one prefix, such as M for mega with the value 1.0E6.
Copyright (c) 2019-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License
- Author:
- Alexander Verbraeck
-
Constructor Summary
ConstructorsConstructorDescriptionSIPrefix(String defaultTextualPrefix, String prefixName, double factor, String defaultDisplayPrefix, PrefixType type) Construct an SI prefix.SIPrefix(String defaultTextualPrefix, String prefixName, double factor, PrefixType type) Construct an SI prefix with the defaultDisplayPrefix equal to the defaultTextualPrefix. -
Method Summary
-
Constructor Details
-
SIPrefix
public SIPrefix(String defaultTextualPrefix, String prefixName, double factor, String defaultDisplayPrefix, PrefixType type) Construct an SI prefix.- Parameters:
defaultTextualPrefix- the prefix abbreviation, duch as "M" for mega and "da" for decaprefixName- the prefix name such as "mega" or "deca"factor- the factor that the SI prefix represents, such as 1.0E6 for megadefaultDisplayPrefix- "μ" for microtype- the prefix type, e.g., KILO
-
SIPrefix
Construct an SI prefix with the defaultDisplayPrefix equal to the defaultTextualPrefix.- Parameters:
defaultTextualPrefix- the prefix abbreviation, duch as "M" for mega and "da" for decaprefixName- the prefix name such as "mega" or "deca"factor- the factor that the SI prefix represents, such as 1.0E6 for megatype- the prefix type, e.g., KILO
-
-
Method Details
-
getDefaultTextualPrefix
Retrieve the default textual prefix.- Returns:
- the default textual prefix
-
getPrefixName
Retrieve the prefix name.- Returns:
- the prefix name
-
getFactor
public double getFactor()Retrieve the factor.- Returns:
- the factor
-
getDefaultDisplayPrefix
Retrieve the default display prefix.- Returns:
- the default display prefix
-
getType
Retrieve the type.- Returns:
- the type
-
toString
-