java.lang.Object
org.rrd4j.graph.FindUnit

class FindUnitextends Object
Utility class for resolving unit symbols based on magnitude. Provides SI unit symbol resolution for value scaling in RRD graphs.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int
    Index of the base unit in the symbol table.
    private static final char[]
    Unit symbols, ordered by magnitude.
    private static final char
    Marks a unit that was not recognised.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Utility class, not intended for instantiation.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    static char
    resolveSymbol(double digits)
    Resolves the appropriate SI unit symbol for the given magnitude.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNIT_UNKNOWN

      private static final char UNIT_UNKNOWN
      Marks a unit that was not recognised.
      See Also:
    • UNIT_SYMBOLS

      private static final char[] UNIT_SYMBOLS
      Unit symbols, ordered by magnitude.
    • SYMBOLS_CENTER

      private static final int SYMBOLS_CENTER
      Index of the base unit in the symbol table.
      See Also:
  • Constructor Details

    • FindUnit

      private FindUnit()
      Utility class, not intended for instantiation.
  • Method Details

    • resolveSymbol

      public static char resolveSymbol(double digits)
      Resolves the appropriate SI unit symbol for the given magnitude.
      Parameters:
      digits - the magnitude index for unit selection
      Returns:
      the unit symbol character, or '?' if unknown