Class IntegerInterval


  • public class IntegerInterval
    extends java.lang.Object
    Mutable integer interval class, thread-safe. Represents the interval [lower,upper].
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  IntegerInterval.Set
      A mutable set of closed integer intervals, stored in normalized form (i.e.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      void expandToCover​(int value)
      Expands the interval to cover the given value by extending one of its sides if necessary.
      int hashCode()  
      int lower()  
      java.lang.String toString()  
      int upper()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IntegerInterval

        public IntegerInterval​(int lower,
                               int upper)
    • Method Detail

      • lower

        public int lower()
      • upper

        public int upper()
      • expandToCover

        public void expandToCover​(int value)
        Expands the interval to cover the given value by extending one of its sides if necessary. Mutates this. Thread-safe.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object