Class Tick


  • @Equality
    public class Tick
    extends java.lang.Object
    Defines a tick on an axis. A tick has a numerical value, used for positioning, and optionally a text label. Ticks with no label are considered minor.
    Since:
    12 Feb 2013
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      Tick​(double value)
      Constructs a minor tick.
      Tick​(double value, java.lang.String label)
      Constructs a tick.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getLabel()
      Returns this tick's text label.
      double getValue()
      Returns this tick's numeric value.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Tick

        public Tick​(double value)
        Constructs a minor tick. This has no text label.
        Parameters:
        value - numeric value
      • Tick

        public Tick​(double value,
                    java.lang.String label)
        Constructs a tick. As long as the label is non-null, this is considered a major tick.
        Parameters:
        value - numeric value
        label - text label
    • Method Detail

      • getValue

        public double getValue()
        Returns this tick's numeric value.
        Returns:
        value
      • getLabel

        public java.lang.String getLabel()
        Returns this tick's text label.
        Returns:
        text label
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object