java.lang.Object
org.rrd4j.graph.FindUnit
Utility class for resolving unit symbols based on magnitude. Provides SI unit symbol resolution for value scaling in RRD graphs.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intIndex of the base unit in the symbol table.private static final char[]Unit symbols, ordered by magnitude.private static final charMarks a unit that was not recognised.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic charresolveSymbol(double digits) Resolves the appropriate SI unit symbol for the given magnitude.
Field Details
UNIT_UNKNOWN
private static final char UNIT_UNKNOWNMarks a unit that was not recognised.- See Also:
UNIT_SYMBOLS
private static final char[] UNIT_SYMBOLSUnit symbols, ordered by magnitude.SYMBOLS_CENTER
private static final int SYMBOLS_CENTERIndex 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