Class AxisSubUnit


  • public final class AxisSubUnit
    extends java.lang.Object
    Computation unit for total, min, max and etc.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void computeTotal​(double dValue)  
      double getLastPosition​(double dValue)
      Gets the last position
      double getNegativeTotal()  
      double getPositiveTotal()  
      double getStackedValue​(double dValue)
      Returns the current accumulated value.
      boolean isStackTogether()
      Returns if current positive and negative values are aggregated together or not
      void reset()  
      void setLastPosition​(double dValue, double dBaseLocation, double dMargin)
      Saves the last position and uses to compute current position by adding margin
      double stackValue​(double dValue)
      Accumulates the value and returns the result.
      double valuePercentage​(double dValue)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • reset

        public void reset()
      • isStackTogether

        public boolean isStackTogether()
        Returns if current positive and negative values are aggregated together or not
        Returns:
        true: together, false: by sign respectively
      • stackValue

        public double stackValue​(double dValue)
        Accumulates the value and returns the result.
        Parameters:
        dValue - the value to accumulate
        Returns:
        the result value after accumulating
        See Also:
        isStackTogether(), getStackedValue(double)
      • getStackedValue

        public double getStackedValue​(double dValue)
        Returns the current accumulated value.
        Parameters:
        dValue - value to check the sign. If stack together, it's no use.
        Returns:
        the current accumulated value.
      • computeTotal

        public void computeTotal​(double dValue)
      • getPositiveTotal

        public double getPositiveTotal()
      • getNegativeTotal

        public double getNegativeTotal()
      • valuePercentage

        public double valuePercentage​(double dValue)
      • setLastPosition

        public void setLastPosition​(double dValue,
                                    double dBaseLocation,
                                    double dMargin)
        Saves the last position and uses to compute current position by adding margin
        Parameters:
        dValue - value to check the max or min location
        dBaseLocation - base location when last position is null
        dMargin - margin location
        See Also:
        "https://bugs.eclipse.org/bugs/show_bug.cgi?id=182279"
      • getLastPosition

        public double getLastPosition​(double dValue)
        Gets the last position
        Parameters:
        dValue - value to check the max or min location