Class LongInterval

  • All Implemented Interfaces:
    Interval

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

      • LongInterval

        public LongInterval​(long min,
                            long max)
      • LongInterval

        public LongInterval​(long min,
                            boolean minIncluded,
                            long max,
                            boolean maxIncluded)
    • Method Detail

      • getMin

        public long 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 long 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