Package: groovy.lang

## [Java] Class EmptyRangeT extends Comparable

- groovy.lang.EmptyRange

- All Implemented Interfaces and Traits:
    Range

      public class EmptyRange
      extends AbstractList

  Constructing Ranges like 0..<0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected T` | `at` | The value at which the range originates (may be `null`).

  - ### Constructor Summary

    Constructors
    Constructor and description
    `EmptyRange (T at)` Creates a new EmptyRange.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `boolean` | `add(T o)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `boolean` | `addAll(int index, Collection<? extends T> c)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `boolean` | `addAll(Collection<? extends T> c)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `boolean` | `containsWithinBounds(Object o)` Never true for an empty range.
    `` | `T` | `get(int index)` Always throws `IndexOutOfBoundsException` for an empty range.
    `` | `T` | `getFrom()` {@inheritDoc}
    `` | `T` | `getTo()` {@inheritDoc}
    `` | `String` | `inspect()` {@inheritDoc}
    `` | `boolean` | `isReverse()` Never true for an empty range.
    `` | `boolean` | `remove(Object o)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `T` | `remove(int index)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `boolean` | `removeAll(Collection<?> c)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `boolean` | `retainAll(Collection<?> c)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `T` | `set(int index, T element)` Always throws `UnsupportedOperationException` for an empty range.
    `` | `int` | `size()` Always 0 for an empty range.
    `` | `void` | `step(int step, Closure closure)` Always does nothing for an empty range.
    `` | `List<T>` | `step(int step)` Always returns an empty list for an empty range.
    `` | `String` | `toString()` {@inheritDoc}

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractList` | `add, add, remove, get, equals, hashCode, indexOf, clear, lastIndexOf, subList, iterator, addAll, set, listIterator, listIterator, remove, toString, isEmpty, contains, size, toArray, toArray, addAll, containsAll, retainAll, removeAll, wait, wait, wait, getClass, notify, notifyAll, toArray, spliterator, stream, removeIf, parallelStream, forEach, replaceAll, sort`

- - ### Field Detail

    - #### protected T at

      The value at which the range originates (may be `null`).

  - ### Constructor Detail

    - #### public EmptyRange(T at)

      Creates a new EmptyRange.

      Parameters:
        `at` - the value at which the range starts (may be `null`).

  - ### Method Detail

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean add(T o)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException always

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean addAll(int index, Collection<? extends T> c)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean addAll(Collection<? extends T> c)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean containsWithinBounds(Object o)

      Never true for an empty range.

      Returns:
        `false`

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public T get(int index)

      Always throws `IndexOutOfBoundsException` for an empty range.

      throws:
        IndexOutOfBoundsException always

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public T getFrom()

      {@inheritDoc}

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public T getTo()

      {@inheritDoc}

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public String inspect()

      {@inheritDoc}

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean isReverse()

      Never true for an empty range.

      Returns:
        `false`

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean remove(Object o)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public T remove(int index)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean removeAll(Collection<?> c)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public boolean retainAll(Collection<?> c)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public T set(int index, T element)

      Always throws `UnsupportedOperationException` for an empty range.

      throws:
        UnsupportedOperationException

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public int size()

      Always 0 for an empty range.

      Returns:
        0

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void step(int step, Closure closure)

      Always does nothing for an empty range.

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public List<T> step(int step)

      Always returns an empty list for an empty range.

    - #### public String toString()

      {@inheritDoc}