Documentation of 'visad.data.DataRange' Java class
DataRange
visad.data

Class DataRange

  • All Implemented Interfaces:
    java.io.Serializable


    public class DataRange
    extends java.lang.Object
    implements java.io.Serializable
    Holds a simple min/max range
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      double max
      The range
      double min
      The range
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double[] asArray()
      Get a 2-aray array holding min/max
      float[] asFloatArray()
      Get a 2-aray array holding min/max
      boolean equals(java.lang.Object o)
      Equals
      double getAbsSpan()
      get abs(max-min)
      double getMax()
      Get the max
      double getMid()
      Get the mid point
      double getMin()
      Get the min
      double getPercent(double v)
      Ge tthe percent the given value is between min and max
      double getSpan()
      max-min
      double getValueOfPercent(double percent)
      Get percent along the way between min and max
      void set(double min, double max)
      set the values
      void setMax(double v)
      Set the max
      void setMax(int v)
      Set the max
      void setMin(double v)
      Set the min
      void setMin(int v)
      Set the min
      double span()
      max-min
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • min

        public double min
        The range
      • max

        public double max
        The range
    • Constructor Detail

      • DataRange

        public DataRange()
        Default ctor
      • DataRange

        public DataRange(double min,
                         double max)
        Create a range with min, max
        Parameters:
        min - min
        max - max
      • DataRange

        public DataRange(double[] a)
        ctor
        Parameters:
        a - 2-ary array holding min/max
      • DataRange

        public DataRange(DataRange r)
        copy ctor
        Parameters:
        r - object
    • Method Detail

      • equals

        public boolean equals(java.lang.Object o)
        Equals
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object
        Returns:
        equals
      • set

        public void set(double min,
                        double max)
        set the values
        Parameters:
        min - min
        max - max
      • getMin

        public double getMin()
        Get the min
        Returns:
        The min value
      • getMax

        public double getMax()
        Get the max
        Returns:
        The max value
      • setMin

        public void setMin(double v)
        Set the min
        Parameters:
        v - value
      • setMax

        public void setMax(double v)
        Set the max
        Parameters:
        v - value
      • setMin

        public void setMin(int v)
        Set the min
        Parameters:
        v - value
      • setMax

        public void setMax(int v)
        Set the max
        Parameters:
        v - value
      • asArray

        public double[] asArray()
        Get a 2-aray array holding min/max
        Returns:
        array of min and max
      • asFloatArray

        public float[] asFloatArray()
        Get a 2-aray array holding min/max
        Returns:
        array of min and max
      • span

        public double span()
        max-min
        Returns:
        max-min
      • getSpan

        public double getSpan()
        max-min
        Returns:
        max-min
      • getAbsSpan

        public double getAbsSpan()
        get abs(max-min)
        Returns:
        abs(max-min)
      • getMid

        public double getMid()
        Get the mid point
        Returns:
        mid point
      • getValueOfPercent

        public double getValueOfPercent(double percent)
        Get percent along the way between min and max
        Parameters:
        percent - percent
        Returns:
        value
      • getPercent

        public double getPercent(double v)
        Ge tthe percent the given value is between min and max
        Parameters:
        v - value
        Returns:
        percent

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.