Class SingleValueRowRedirection
java.lang.Object
io.deephaven.engine.table.impl.util.SingleValueRowRedirection
- All Implemented Interfaces:
ChunkSource<RowKeys>,ChunkSource.WithPrev<RowKeys>,FillContextMaker,GetContextMaker,DefaultChunkSource<RowKeys>,DefaultChunkSource.WithPrev<RowKeys>,FillUnordered<RowKeys>,RowRedirection
- Direct Known Subclasses:
WritableSingleValueRowRedirection
RowRedirection that redirects all outer row keys to the same inner row key.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Any>Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Any>, DefaultChunkSource.WithPrev<ATTR extends Any> -
Field Summary
FieldsFields inherited from interface io.deephaven.engine.table.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields inherited from interface io.deephaven.engine.table.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfillChunk(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequenceand write the result to aWritableLongChunk.voidfillPrevChunk(@NotNull ChunkSource.FillContext fillContext, @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull RowSequence outerRowKeys) Lookup each element in aRowSequenceusing previous values and write the result to aWritableLongChunk.longget(long outerRowKey) Simple redirected lookup.longgetPrev(long outerRowKey) Simple redirected lookup, using previous values.longgetValue()final booleantoString()Cast this SingleValueRowRedirection reference to aWritableSingleValueRowRedirection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface io.deephaven.engine.table.impl.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFilling, getPrevSourceMethods inherited from interface io.deephaven.engine.table.FillContextMaker
makeFillContextMethods inherited from interface io.deephaven.engine.table.GetContextMaker
makeGetContextMethods inherited from interface io.deephaven.engine.table.impl.util.RowRedirection
ascendingMapping, fillChunkUnordered, fillPrevChunkUnordered, getChunkType, isWritable, providesFillUnordered, writableCast
-
Field Details
-
value
protected long value
-
-
Constructor Details
-
SingleValueRowRedirection
public SingleValueRowRedirection(long value)
-
-
Method Details
-
get
public long get(long outerRowKey) Description copied from interface:RowRedirectionSimple redirected lookup.- Specified by:
getin interfaceRowRedirection- Parameters:
outerRowKey- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEYif no mapping exists
-
getPrev
public long getPrev(long outerRowKey) Description copied from interface:RowRedirectionSimple redirected lookup, using previous values.- Specified by:
getPrevin interfaceRowRedirection- Parameters:
outerRowKey- The "outer" row key- Returns:
- The corresponding "inner" row key, or
RowSequence.NULL_ROW_KEYif no mapping exists
-
toString
-
fillChunk
public void fillChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull RowSequence outerRowKeys) Description copied from interface:RowRedirectionLookup each element in aRowSequenceand write the result to aWritableLongChunk.- Specified by:
fillChunkin interfaceChunkSource<RowKeys>- Specified by:
fillChunkin interfaceRowRedirection- Parameters:
fillContext- Thefill contextinnerRowKeys- The resultWritableLongChunkouterRowKeys- The row keys to lookup in this RowRedirection
-
fillPrevChunk
public void fillPrevChunk(@NotNull @NotNull ChunkSource.FillContext fillContext, @NotNull @NotNull WritableChunk<? super RowKeys> innerRowKeys, @NotNull @NotNull RowSequence outerRowKeys) Description copied from interface:RowRedirectionLookup each element in aRowSequenceusing previous values and write the result to aWritableLongChunk.- Specified by:
fillPrevChunkin interfaceChunkSource.WithPrev<RowKeys>- Specified by:
fillPrevChunkin interfaceRowRedirection- Parameters:
fillContext- Thefill contextinnerRowKeys- The resultWritableLongChunkouterRowKeys- The row keys to lookup in this RowRedirection
-
getValue
public long getValue() -
isWritableSingleValue
public final boolean isWritableSingleValue()- Returns:
- Whether this SingleValueRowRedirection is actually
writable
-
writableSingleValueCast
Cast this SingleValueRowRedirection reference to a
WritableSingleValueRowRedirection.- Returns:
thiscast to aWritableSingleValueRowRedirection- Throws:
ClassCastException- Ifthisis not aWritableSingleValueRowRedirection
-