Interface SingleRangeMixin
- All Superinterfaces:
AutoCloseable
,LongSizedDataStructure
,RowSequence
,SafeCloseable
- All Known Implementing Classes:
SingleRangeRowSequence
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.rowset.RowSequence
RowSequence.Iterator
-
Field Summary
Fields inherited from interface io.deephaven.engine.rowset.RowSequence
NULL_ROW_KEY
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
For as long as the consumer wants more row keys, call accept on the consumer with the individual row key instances in this RowSequence, in increasing order.default boolean
For as long as the consumer wants more ranges, call accept on the consumer with the individual row key ranges in this RowSequence, in increasing order.default long
Get an estimate of the average (mean) length of runs of adjacent row keys in thisRowSequence
.default RowSequence
getRowSequenceByKeyRange
(long startRowKeyInclusive, long endRowKeyInclusive) Get an ordered subset of the row keys in thisRowSequence
for a row key range.default RowSequence
getRowSequenceByPosition
(long startPositionInclusive, long length) Get an ordered subset of the row keys in thisRowSequence
for a position range.default RowSequence.Iterator
Get anRowSequence.Iterator
over thisRowSequence
.default boolean
Helper to tell you if this is one contiguous range.long
rangeEnd()
default long
long
long
size()
Get the number of row keys in thisRowSequence
.Methods inherited from interface io.deephaven.util.datastructures.LongSizedDataStructure
intSize, intSize
Methods inherited from interface io.deephaven.engine.rowset.RowSequence
asRowKeyChunk, asRowKeyRangesChunk, asRowSet, close, fillRowKeyChunk, fillRowKeyRangesChunk, firstRowKey, forAllRowKeyRanges, forAllRowKeys, isEmpty, lastRowKey
-
Method Details
-
forEachRowKey
Description copied from interface:RowSequence
For as long as the consumer wants more row keys, call accept on the consumer with the individual row key instances in this RowSequence, in increasing order.- Specified by:
forEachRowKey
in interfaceRowSequence
- Parameters:
lc
- a consumer to feed the individual row key values to.- Returns:
- false if the consumer provided ever returned false, true otherwise.
-
forEachRowKeyRange
Description copied from interface:RowSequence
For as long as the consumer wants more ranges, call accept on the consumer with the individual row key ranges in this RowSequence, in increasing order.- Specified by:
forEachRowKeyRange
in interfaceRowSequence
- Parameters:
larc
- a consumer to feed the individual row key values to.- Returns:
- false if the consumer provided ever returned false, true otherwise.
-
getRowSequenceByPosition
Description copied from interface:RowSequence
Get an ordered subset of the row keys in this
RowSequence
for a position range. The result will contain the set of row keys inthis
that lie at positions in the half-open range [startPositionInclusive
,startPositionInclusive + length
). The returned reference is owned by the caller, who should callclose()
when it is done with it.- Specified by:
getRowSequenceByPosition
in interfaceRowSequence
- Parameters:
startPositionInclusive
- The position of the first row key to includelength
- The number of row keys to include- Returns:
- The subset as an
RowSequence
, which may bethis
-
getRowSequenceByKeyRange
Description copied from interface:RowSequence
Get an ordered subset of the row keys in this
RowSequence
for a row key range. The returned set will be the intersection of the row keys inthis
with the row keys in the closed interval [startRowKeyInclusive
,endRowKeyInclusive
]. The returned reference is owned by the caller, who should callclose()
when it is done with it.- Specified by:
getRowSequenceByKeyRange
in interfaceRowSequence
- Parameters:
startRowKeyInclusive
- The minimum row key to includeendRowKeyInclusive
- The maximum row key to include- Returns:
- The subset as an
RowSequence
, which may bethis
-
getRowSequenceIterator
Description copied from interface:RowSequence
Get anRowSequence.Iterator
over thisRowSequence
.- Specified by:
getRowSequenceIterator
in interfaceRowSequence
- Returns:
- A new iterator, positioned at the first row key
-
rangesCountUpperBound
default long rangesCountUpperBound() -
getAverageRunLengthEstimate
default long getAverageRunLengthEstimate()Description copied from interface:RowSequence
Get an estimate of the average (mean) length of runs of adjacent row keys in this
RowSequence
.Implementations should strive to keep this method efficient (O(1) preferred) at the expense of accuracy.
Empty
RowSequence
should return an arbitrary valid value, usually 1.- Specified by:
getAverageRunLengthEstimate
in interfaceRowSequence
- Returns:
- An estimate of the average run length in this
RowSequence
, in [1,size()
]
-
isContiguous
default boolean isContiguous()Description copied from interface:RowSequence
Helper to tell you if this is one contiguous range.- Specified by:
isContiguous
in interfaceRowSequence
-
size
long size()Description copied from interface:RowSequence
Get the number of row keys in thisRowSequence
.- Specified by:
size
in interfaceLongSizedDataStructure
- Specified by:
size
in interfaceRowSequence
- Returns:
- The size, in [0,
Long.MAX_VALUE
]
-
rangeStart
long rangeStart() -
rangeEnd
long rangeEnd()
-