public class CachedTupleSequence extends Object implements TupleSequence
Constructor and Description |
---|
CachedTupleSequence(java.util.function.Supplier<CachedReader> maskSupplier,
java.util.function.Supplier<CachedReader[]> colsSupplier,
long nrow)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanValue(int icol)
Returns the value of a given column as a boolean.
|
double |
getDoubleValue(int icol)
Returns the value of a given column as a double.
|
int |
getIntValue(int icol)
Returns the value of a given column as an integer.
|
long |
getLongValue(int icol)
Returns the value of a given column as a long.
|
Object |
getObjectValue(int icol)
Returns the value of a given column as an object.
|
long |
getRowIndex()
Returns the row index for the underlying data set.
|
boolean |
next()
Advances to the next entry.
|
TupleSequence |
split()
Attempts to partition this object into two halves,
ideally of similar size.
|
long |
splittableSize()
Provides an estimate of the number of processable items in this object.
|
public CachedTupleSequence(java.util.function.Supplier<CachedReader> maskSupplier, java.util.function.Supplier<CachedReader[]> colsSupplier, long nrow)
maskSupplier
- supplier for boolean-typed column reader,
providing inclusion flags per row;
null means include all rowscolsSupplier
- supplier for array of columns providing
data cells per rowpublic boolean next()
TupleSequence
next
in interface TupleSequence
next
in interface Sequence
public TupleSequence split()
Splittable
Following a successful call, the two parts may be processed in different threads.
split
in interface Splittable<TupleSequence>
Spliterator.trySplit()
public long splittableSize()
Splittable
If no estimate for the size is available, a negative value should be returned.
splittableSize
in interface Splittable<TupleSequence>
public long getRowIndex()
Tuple
getRowIndex
in interface Tuple
public Object getObjectValue(int icol)
Tuple
If the result is a mutable object, its value may be overwritten by
subsequent calls to this method
(especially following calls to TupleSequence.next()
if this
object also implements TupleSequence
).
getObjectValue
in interface Tuple
icol
- column indexicol
,
presumed of object typepublic double getDoubleValue(int icol)
Tuple
getDoubleValue
in interface Tuple
icol
- column indexicol
,
presumed of numeric typepublic int getIntValue(int icol)
Tuple
getIntValue
in interface Tuple
icol
- column indexicol
,
presumed of numeric typepublic long getLongValue(int icol)
Tuple
getLongValue
in interface Tuple
icol
- column indexicol
,
presumed of numeric typepublic boolean getBooleanValue(int icol)
Tuple
getBooleanValue
in interface Tuple
icol
- column indexicol
,
presumed of boolean typeCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.