Package org.apache.tapestry5.commons.util

## Class IntegerRange

- java.lang.Object
- - org.apache.tapestry5.commons.util.IntegerRange

- All Implemented Interfaces:
    `java.lang.Iterable<java.lang.Integer>`

      public final class IntegerRange
      extends java.lang.Object
      implements java.lang.Iterable<java.lang.Integer>

  Represents a sequence of integer values, either ascending or descending. The sequence is always inclusive (of the finish value).

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IntegerRange​(int start, int finish)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object obj)` | Returns true if the other object is an IntegerRange with the same start and finish values.
    `int` | `getFinish()` |
    `int` | `getStart()` |
    `int` | `hashCode()` |
    `java.util.Iterator<java.lang.Integer>` | `iterator()` | The main puprose of a range object is to produce an Iterator.
    `java.lang.String` | `toString()` |

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### IntegerRange

          public IntegerRange​(int start,
                              int finish)

  - ### Method Detail

    - #### getFinish

          public int getFinish()

    - #### getStart

          public int getStart()

    - #### toString

          public java.lang.String toString()

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

    - #### iterator

          public java.util.Iterator<java.lang.Integer> iterator()

      The main puprose of a range object is to produce an Iterator. Since IntegerRange is iterable, it is useful with the Tapestry Loop component, but also with the Java for loop!
      Specified by:
        `iterator` in interface `java.lang.Iterable<java.lang.Integer>`

    - #### hashCode

          public int hashCode()

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

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Returns true if the other object is an IntegerRange with the same start and finish values.
      Overrides:
        `equals` in class `java.lang.Object`