Class Rounding


  • @Equality
    public abstract class Rounding
    extends java.lang.Object
    Defines a policy for coming up with round numbers.
    Since:
    1 Feb 2017
    Author:
    Mark Taylor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Rounding DECIMAL
      Policy suitable for normal numeric axes.
      static Rounding SECONDS
      Policy suitable for time axes with data units of seconds.
    • Constructor Summary

      Constructors 
      Constructor Description
      Rounding()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract Rounder getRounder​(boolean isLog)
      Returns a rounder object for linear/logarithmic rounding.
      static Rounding getRounding​(boolean isTime)
      Returns a suitable implementation for an axis that either is or is not a time axis.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DECIMAL

        public static Rounding DECIMAL
        Policy suitable for normal numeric axes.
      • SECONDS

        public static Rounding SECONDS
        Policy suitable for time axes with data units of seconds.
    • Constructor Detail

      • Rounding

        public Rounding()
    • Method Detail

      • getRounder

        public abstract Rounder getRounder​(boolean isLog)
        Returns a rounder object for linear/logarithmic rounding.
        Parameters:
        isLog - true for logarithmic, false for linear
        Returns:
        rounder
      • getRounding

        public static Rounding getRounding​(boolean isTime)
        Returns a suitable implementation for an axis that either is or is not a time axis.
        Parameters:
        isTime - true for time axis in seconds, false for normal numeric
        Returns:
        rounding instance