public interface SequenceLength
Sequence.| Modifier and Type | Field and Description |
|---|---|
static long |
L_NEGATIVE_INDICES |
static long |
L_UNBOUNDED |
static SequenceLength |
NEGATIVE_INDICES |
static SequenceLength |
UNBOUNDED |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isInRange(long index,
SequenceLength length)
Checks whether an index is in range.
|
default boolean |
isUnbounded()
Indicates whether every positive long is accepted.
|
long |
length()
Number of elements that can be accessed through
Sequence.value(long);
negative if sequence is unbounded or allows negative indices. |
static SequenceLength |
min(SequenceLength a,
SequenceLength b) |
default boolean |
negativeIndices()
Indicates whether negative indices are accepted.
|
static long |
toLong(SequenceLength length) |
static final long L_UNBOUNDED
static final long L_NEGATIVE_INDICES
static final SequenceLength UNBOUNDED
static final SequenceLength NEGATIVE_INDICES
long length()
Sequence.value(long);
negative if sequence is unbounded or allows negative indices.default boolean isUnbounded()
default boolean negativeIndices()
static boolean isInRange(long index,
SequenceLength length)
index - length - static long toLong(SequenceLength length)
static SequenceLength min(SequenceLength a, SequenceLength b)
Copyright © 2019. All rights reserved.