public class Range extends Object
Range.between(1,5);
Range.between(1,5).andToEndFrom(10);
Modifier and Type | Field and Description |
---|---|
(package private) CompositeRange |
compositeRange |
Modifier and Type | Method and Description |
---|---|
Range |
andBetween(int from,
int to)
Adds a range element to include all indexes between (and including) the given
indexes.
|
Range |
andFromStartTo(int to)
Adds a range element to include all indexes from 1 to and inclusive of the
given index.
|
Range |
andOf(int... indexes) |
Range |
andToEndFrom(int from)
Adds a range element to include all indexes from (and including) the given index
to any greater index.
|
static Range |
between(int from,
int to)
Creates a range element to include all elements between (and including) the given
indexes.
|
static Range |
fromStartTo(int to)
Creates a range element to include all indexes from 1 to (and inclusive of) the
given index.
|
boolean |
isWithinRange(int index) |
static Range |
of(int... indexes) |
static Range |
toEndFrom(int from)
Creates a range element to include all elements from (and including) the given
index to any greater index.
|
String |
toString() |
final CompositeRange compositeRange
public boolean isWithinRange(int index)
index
- public Range andOf(int... indexes)
indexes
- a list of indexes to include in the rangepublic Range andFromStartTo(int to)
to
- public Range andToEndFrom(int from)
from
- public Range andBetween(int from, int to)
from
- to
- public static Range of(int... indexes)
indexes
- a list of indexes to include in the rangepublic static Range fromStartTo(int to)
to
- public static Range toEndFrom(int from)
from
- Copyright © 2024. All rights reserved.