Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jexl3.internal
Class LongRange

    java.lang.Object
      org.apache.commons.jexl3.internal.LongRange

All Implemented Interfaces:
  Iterable<Long>, Collection<Long>

Direct Known Subclasses:
  LongRange.Ascending, LongRange.Descending

    public abstract class LongRange

extends Object
implements Collection<Long>

A range of longs.

Behaves as a readonly collection of longs.

Nested Class Summary
`static class` | `LongRange.Ascending` Ascending long range.
`static class` | `LongRange.Descending` Descending long range.

Field Summary
`protected long` | `max` The upper boundary.
`protected long` | `min` The lower boundary.

Constructor Summary
`protected` | `LongRange(long from, long to)` Creates a new range.

Method Summary
`boolean` | `add(Long e)`
`boolean` | `addAll(Collection<? extends Long> c)`
`void` | `clear()`
`boolean` | `contains(Object o)`
`boolean` | `containsAll(Collection<?> c)`
`static LongRange` | `create(long from, long to)` Creates a range, ascending or descending depending on boundaries order.
`boolean` | `equals(Object obj)`
`long` | `getMax()` Gets the interval maximum value.
`long` | `getMin()` Gets the interval minimum value.
`int` | `hashCode()`
`boolean` | `isEmpty()`
`abstract Iterator<Long>` | `iterator()`
`boolean` | `remove(Object o)`
`boolean` | `removeAll(Collection<?> c)`
`boolean` | `retainAll(Collection<?> c)`
`int` | `size()`
`Object[]` | `toArray()`
`
`<T> T[]`
` | `toArray(T[] array)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### min

    protected final long min

  The lower boundary.

### max

    protected final long max

  The upper boundary.

Constructor Detail

### LongRange

    protected LongRange(long from,
                        long to)

  Creates a new range.

  Parameters:
    `from` - the lower inclusive boundary
    `to` - the higher inclusive boundary

Method Detail

### create

    public static LongRange create(long from,
                                   long to)

  Creates a range, ascending or descending depending on boundaries order.

  Parameters:
    `from` - the lower inclusive boundary
    `to` - the higher inclusive boundary
  Returns:
    a range

### getMin

    public long getMin()

  Gets the interval minimum value.

  Returns:
    the low boundary

### getMax

    public long getMax()

  Gets the interval maximum value.

  Returns:
    the high boundary

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Collection<Long>`
  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Specified by:
    `equals` in interface `Collection<Long>`
  Overrides:
    `equals` in class `Object`

### iterator

    public abstract Iterator<Long> iterator()

  Specified by:
    `iterator` in interface `Iterable<Long>`
  Specified by:
    `iterator` in interface `Collection<Long>`

### size

    public int size()

  Specified by:
    `size` in interface `Collection<Long>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection<Long>`

### contains

    public boolean contains(Object o)

  Specified by:
    `contains` in interface `Collection<Long>`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `Collection<Long>`

### toArray

    public <T> T[] toArray(T[] array)

  Specified by:
    `toArray` in interface `Collection<Long>`

### containsAll

    public boolean containsAll(Collection<?> c)

  Specified by:
    `containsAll` in interface `Collection<Long>`

### add

    public boolean add(Long e)

  Specified by:
    `add` in interface `Collection<Long>`

### remove

    public boolean remove(Object o)

  Specified by:
    `remove` in interface `Collection<Long>`

### addAll

    public boolean addAll(Collection<? extends Long> c)

  Specified by:
    `addAll` in interface `Collection<Long>`

### removeAll

    public boolean removeAll(Collection<?> c)

  Specified by:
    `removeAll` in interface `Collection<Long>`

### retainAll

    public boolean retainAll(Collection<?> c)

  Specified by:
    `retainAll` in interface `Collection<Long>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection<Long>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.