Class SymbolicTickUnit

All Implemented Interfaces:
Serializable, Comparable

public class SymbolicTickUnit
extends NumberTickUnit
implements Serializable
A symbolic tick unit.
Author:
Anthony Boulestreau
See Also:
Serialized Form
  • Constructor Details

    • SymbolicTickUnit

      public SymbolicTickUnit​(double size, String[] sv)
      Creates a new symbolic tick unit.
      Parameters:
      size - the size of the tick unit.
      sv - the list of symbolic value to display instead of the numeric value.
  • Method Details

    • valueToString

      public String valueToString​(double value)
      Converts a value to a string, using the list of symbolic values. ex: if the symbolic value list is ["up", "down"] then 0 is convert to "up" and 1 to "down".
      Overrides:
      valueToString in class NumberTickUnit
      Parameters:
      value - value to convert.
      Returns:
      the symbolic value.
    • getSymbolCount

      public int getSymbolCount()
      Returns the number of symbols in this unit.
      Returns:
      the symbol count.