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-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 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 deca
      prefixName - String; the prefix name such as "mega" or "deca"
      factor - double; the factor that the SI prefix represents, such as 1.0E6 for mega
      defaultDisplayPrefix - the display prefix; "μ" for micro
    • SIPrefix

      public SIPrefix(String defaultTextualPrefix, String prefixName, double factor)
      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 deca
      prefixName - 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

      public String getDefaultTextualPrefix()
      Retrieve the default textual prefix.
      Returns:
      String; the default textual prefix
    • getPrefixName

      public String getPrefixName()
      Retrieve the prefix name.
      Returns:
      String; the prefix name
    • getFactor

      public double getFactor()
      Retrieve the factor.
      Returns:
      double; the factor
    • getDefaultDisplayPrefix

      public String getDefaultDisplayPrefix()
      Retrieve the default display prefix.
      Returns:
      String; the default display prefix
    • toString

      public String toString()
      Overrides:
      toString in class Object