jif.visit

## Class IntegerBoundsChecker.Interval

- java.lang.Object
- - jif.visit.IntegerBoundsChecker.Interval

- Enclosing class:
    IntegerBoundsChecker

      public static class IntegerBoundsChecker.Interval
      extends java.lang.Object

  A closed interval over the integers.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static IntegerBoundsChecker.Interval` | `FULL` Interval representing all integers.
    `protected java.lang.Long` | `lower`
    `static IntegerBoundsChecker.Interval` | `POS` The non-negative integers (includes 0).
    `protected java.lang.Long` | `upper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Interval(java.lang.Long lower, java.lang.Long upper)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IntegerBoundsChecker.Interval` | `add(IntegerBoundsChecker.Interval other)`
    `boolean` | `contains(IntegerBoundsChecker.Interval other)` Returns whether this interval is a superset of the other.
    `boolean` | `equals(java.lang.Object o)`
    `java.lang.Long` | `getLower()`
    `java.lang.Long` | `getUpper()`
    `int` | `hashCode()`
    `IntegerBoundsChecker.Interval` | `intersect(IntegerBoundsChecker.Interval other)` Returns the intersection of this and the other interval.
    `protected java.lang.Long` | `longMult(java.lang.Long i, java.lang.Long j)`
    `IntegerBoundsChecker.Interval` | `multiply(IntegerBoundsChecker.Interval other)`
    `IntegerBoundsChecker.Interval` | `shift(long i)` Returns an interval that is this one shifted by the given amount.
    `static IntegerBoundsChecker.Interval` | `singleton(long i)` Returns an interval containing only one integer.
    `IntegerBoundsChecker.Interval` | `subtract(IntegerBoundsChecker.Interval other)`
    `java.lang.String` | `toString()`
    `IntegerBoundsChecker.Interval` | `union(IntegerBoundsChecker.Interval other)` Returns the smallest interval that contains this and the other interval.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### FULL

          public static final IntegerBoundsChecker.Interval FULL

      Interval representing all integers.

    - #### POS

          public static final IntegerBoundsChecker.Interval POS

      The non-negative integers (includes 0).

    - #### lower

          protected final java.lang.Long lower

    - #### upper

          protected final java.lang.Long upper

  - ### Constructor Detail

    - #### Interval

          public Interval(java.lang.Long lower,
                          java.lang.Long upper)

  - ### Method Detail

    - #### singleton

          public static IntegerBoundsChecker.Interval singleton(long i)

      Returns an interval containing only one integer.

    - #### getLower

          public java.lang.Long getLower()

    - #### getUpper

          public java.lang.Long getUpper()

    - #### contains

          public boolean contains(IntegerBoundsChecker.Interval other)

      Returns whether this interval is a superset of the other.

    - #### union

          public IntegerBoundsChecker.Interval union(IntegerBoundsChecker.Interval other)

      Returns the smallest interval that contains this and the other interval.

    - #### intersect

          public IntegerBoundsChecker.Interval intersect(IntegerBoundsChecker.Interval other)

      Returns the intersection of this and the other interval.

    - #### shift

          public IntegerBoundsChecker.Interval shift(long i)

      Returns an interval that is this one shifted by the given amount.

    - #### add

          public IntegerBoundsChecker.Interval add(IntegerBoundsChecker.Interval other)

    - #### subtract

          public IntegerBoundsChecker.Interval subtract(IntegerBoundsChecker.Interval other)

    - #### longMult

          protected java.lang.Long longMult(java.lang.Long i,
                                            java.lang.Long j)

    - #### multiply

          public IntegerBoundsChecker.Interval multiply(IntegerBoundsChecker.Interval other)

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`