Class DoubleInterval

  • All Implemented Interfaces:
    Interval

    public class DoubleInterval
    extends Object
    implements Interval
    This class define a double interval.
    Since:
    0.8
    Author:
    Laurent Jourdren
    • Constructor Detail

      • DoubleInterval

        public DoubleInterval​(double min,
                              double max)
      • DoubleInterval

        public DoubleInterval​(double min,
                              boolean minIncluded,
                              double max,
                              boolean maxIncluded)
    • Method Detail

      • getMin

        public double getMin()
        Get the minimal value of the interval.
        Returns:
        the minimal value of the interval
      • isMinIncluded

        public boolean isMinIncluded()
        Test if the minimal value is included in the interval.
        Returns:
        true if the minimal value is included in the interval.
      • getMax

        public double getMax()
        Get the maximal value of the interval.
        Returns:
        the maximal value of the interval
      • isMaxIncluded

        public boolean isMaxIncluded()
        Test if the maximal value is included in the interval.
        Returns:
        true if the maximal value is included in the interval.
      • isInInterval

        public boolean isInInterval​(Number value)
        Description copied from interface: Interval
        Test if a number is in an interval.
        Specified by:
        isInInterval in interface Interval
        Parameters:
        value - value to test
        Returns:
        true if the number is in the interval