Class CountScaler


  • public class CountScaler
    extends java.lang.Object
    Scales integer count values according to a supplied Scaler object.
    Since:
    26 Jan 2015
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      CountScaler​(Scaler scaler, int maxOut)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int scaleCount​(int count)
      Scales in input whole number to an output whole number.
      • Methods inherited from class java.lang.Object

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

      • CountScaler

        public CountScaler​(Scaler scaler,
                           int maxOut)
        Constructor.
        Parameters:
        scaler - provides basic scaling behaviour
        maxOut - defines output value range 0..maxOut
    • Method Detail

      • scaleCount

        public int scaleCount​(int count)
        Scales in input whole number to an output whole number. Zero maps to zero, other values map according to this object's Scaler.
        Parameters:
        count - unscaled value, in range 0..maxIn
        Returns:
        scaled count, in range 0..maxOut