Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.lang
Class IntRangeIterator

Iterates through each number in an `IntRange`.

Field Summary
`int` | `from`
`int` | `index`
`boolean` | `reverse`
`int` | `size`
`int` | `to`
`int` | `value`

Constructor Summary
`IntRangeIterator()`

Method Summary
`def` | `IntRange(int from, int to)`
`def` | `IntRange(int from, int to, boolean reverse)` Creates a new `IntRange`.
`boolean` | `contains(Object value)`
`boolean` | `containsAll(Collection other)`
`boolean` | `containsWithinBounds(Object o)`
`boolean` | `equals(Object that)`
`boolean` | `equals(IntRange that)`
`Object` | `get(int index)`
`Comparable` | `getFrom()`
`int` | `getFromInt()` Gets the 'from' value as an integer.
`Comparable` | `getTo()`
`int` | `getToInt()` Gets the 'to' value as an integer.
`boolean` | `hasNext()`
`String` | `inspect()`
`boolean` | `isReverse()`
`Iterator` | `iterator()`
`Object` | `next()`
`void` | `remove()` Not supported.
`int` | `size()`
`void` | `step(int step, Closure closure)`
`List` | `step(int step)`
`List` | `subList(int fromIndex, int toIndex)`
`String` | `toString()`

Constructor Detail

### IntRangeIterator

    IntRangeIterator()

Method Detail

### IntRange

    public def IntRange(int from, int to)

### IntRange

    def IntRange(int from, int to, boolean reverse)

  Creates a new `IntRange`.
  param:
    from the first value in the range.
  param:
    to the last value in the range.
  param:
    reverse `true` if the range should count from
  `to` to `from`.
  throws:
    IllegalArgumentException if `from` is greater than `to`.

### contains

    public boolean contains(Object value)

### containsAll

    public boolean containsAll(Collection other)

### containsWithinBounds

    public boolean containsWithinBounds(Object o)

### equals

    public boolean equals(Object that)

### equals

    public boolean equals(IntRange that)

### get

    public Object get(int index)

### getFrom

    public Comparable getFrom()

### getFromInt

    public int getFromInt()

  Gets the 'from' value as an integer.
  return:
    the 'from' value as an integer.

### getTo

    public Comparable getTo()

### getToInt

    public int getToInt()

  Gets the 'to' value as an integer.
  return:
    the 'to' value as an integer.

### hasNext

    public boolean hasNext()

### inspect

    public String inspect()

### isReverse

    public boolean isReverse()

### iterator

    public Iterator iterator()

### next

    public Object next()

### remove

    public void remove()

  Not supported.
  throws:
    javax.naming.OperationNotSupportedException always

### size

    public int size()

### step

    public void step(int step, Closure closure)

### step

    public List step(int step)

### subList

    public List subList(int fromIndex, int toIndex)

### toString

    public String toString()