Package io.deephaven.chunk
Class ResettableWritableObjectChunk<T,ATTR_BASE extends Any>
java.lang.Object
io.deephaven.chunk.ChunkBase<ATTR>
io.deephaven.chunk.ObjectChunk<T,ATTR>
io.deephaven.chunk.WritableObjectChunk<T,ATTR_BASE>
io.deephaven.chunk.ResettableWritableObjectChunk<T,ATTR_BASE>
- All Implemented Interfaces:
Chunk<ATTR_BASE>,ResettableChunk<ATTR_BASE>,ResettableWritableChunk<ATTR_BASE>,PoolableChunk<ATTR_BASE>,WritableChunk<ATTR_BASE>,SafeCloseable,AutoCloseable
public class ResettableWritableObjectChunk<T,ATTR_BASE extends Any>
extends WritableObjectChunk<T,ATTR_BASE>
implements ResettableWritableChunk<ATTR_BASE>
ResettableWritableChunk implementation for Object data.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.chunk.Chunk
Chunk.Visitor<ATTR extends Any> -
Field Summary
Fields inherited from interface io.deephaven.chunk.Chunk
MAXIMUM_SIZE, SYSTEM_ARRAYCOPY_THRESHOLD, SYSTEM_ARRAYFILL_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ATTR extends ATTR_BASE>
WritableObjectChunk<T,ATTR> clear()Reset this chunk to empty storage.static <T,ATTR_BASE extends Any>
ResettableWritableObjectChunk<T,ATTR_BASE> <ATTR extends ATTR_BASE>
WritableObjectChunk<T,ATTR> resetFromArray(Object array) Reset the data and bounds of this chunk to the entire range of the specified array.<ATTR extends ATTR_BASE>
WritableObjectChunk<T,ATTR> resetFromArray(Object array, int offset, int capacity) Reset the data and bounds of this chunk to a range or sub-range of the specified array.<ATTR extends ATTR_BASE>
WritableObjectChunk<T,ATTR> resetFromChunk(WritableChunk<ATTR> other, int offset, int capacity) Reset the data and bounds of this chunk to a range or sub-range of the specifiedWritableChunk.<ATTR extends ATTR_BASE>
WritableObjectChunk<T,ATTR> resetFromTypedArray(T[] data, int offset, int capacity) <ATTR extends ATTR_BASE>
WritableObjectChunk<T,ATTR> resetFromTypedChunk(WritableObjectChunk<T, ATTR> other, int offset, int capacity) slice(int offset, int capacity) Make a new Chunk that represents either exactly the same view on the underlying data as this Chunk, or a subrange of that view.Methods inherited from class io.deephaven.chunk.WritableObjectChunk
add, appendTypedChunk, array, arrayOffset, asTypedWritableObjectChunk, close, copyFromArray, copyFromChunk, copyFromTypedArray, copyFromTypedChunk, fillWithBoxedValue, fillWithNullValue, fillWithValue, makeWritableChunk, set, sort, sort, upcast, writableChunkWrap, writableChunkWrapMethods inherited from class io.deephaven.chunk.ObjectChunk
asTypedObjectChunk, binarySearch, binarySearch, chunkWrap, chunkWrap, copyToArray, copyToChunk, copyToTypedArray, downcast, get, getChunkType, getEmptyChunk, isAlias, isAlias, isNull, makeArray, walkMethods inherited from class io.deephaven.chunk.ChunkBase
internalCapacity, internalSetSize, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.chunk.Chunk
asBooleanChunk, asByteChunk, asCharChunk, asDoubleChunk, asFloatChunk, asIntChunk, asLongChunk, asObjectChunk, asShortChunk, checkChunkType, copyToArray, copyToBuffer, copyToChunk, getChunkType, isAlias, isAlias, size, walkMethods inherited from interface io.deephaven.chunk.ResettableWritableChunk
asResettableWritableBooleanChunk, asResettableWritableByteChunk, asResettableWritableCharChunk, asResettableWritableDoubleChunk, asResettableWritableFloatChunk, asResettableWritableIntChunk, asResettableWritableLongChunk, asResettableWritableObjectChunk, asResettableWritableShortChunkMethods inherited from interface io.deephaven.util.SafeCloseable
closeMethods inherited from interface io.deephaven.chunk.WritableChunk
asWritableBooleanChunk, asWritableByteChunk, asWritableCharChunk, asWritableDoubleChunk, asWritableFloatChunk, asWritableIntChunk, asWritableLongChunk, asWritableObjectChunk, asWritableShortChunk, capacity, copyFromArray, copyFromBuffer, copyFromChunk, fillWithBoxedValue, fillWithNullValue, internalCapacity, internalSetSize, setSize, sort, sort
-
Constructor Details
-
ResettableWritableObjectChunk
protected ResettableWritableObjectChunk()
-
-
Method Details
-
makeResettableChunk
public static <T,ATTR_BASE extends Any> ResettableWritableObjectChunk<T,ATTR_BASE> makeResettableChunk() -
slice
Description copied from interface:ChunkMake a new Chunk that represents either exactly the same view on the underlying data as this Chunk, or a subrange of that view. The view is defined as [0..size) (in the coordinate space of this Chunk).- Specified by:
slicein interfaceChunk<T>- Specified by:
slicein interfaceWritableChunk<T>- Overrides:
slicein classWritableObjectChunk<T,ATTR_BASE extends Any> - Parameters:
offset- Offset of the new Chunk, relative to this Chunk. 0 ≤ offset ≤ this.sizecapacity- Capacity and initial size of the new Chunk. 0 ≤ capacity ≤ this.size -offset.- Returns:
- The new Chunk. A new Chunk will always be returned, even if the Chunks represent the same view.
-
resetFromChunk
public <ATTR extends ATTR_BASE> WritableObjectChunk<T,ATTR> resetFromChunk(WritableChunk<ATTR> other, int offset, int capacity) Description copied from interface:ResettableChunkReset the data and bounds of this chunk to a range or sub-range of the specifiedWritableChunk.- Specified by:
resetFromChunkin interfaceResettableChunk<T>- Specified by:
resetFromChunkin interfaceResettableWritableChunk<T>- Parameters:
other- The otherWritableChunkoffset- The offset into othercapacity- The capacity this should have after reset- Returns:
- this
-
resetFromArray
public <ATTR extends ATTR_BASE> WritableObjectChunk<T,ATTR> resetFromArray(Object array, int offset, int capacity) Description copied from interface:ResettableChunkReset the data and bounds of this chunk to a range or sub-range of the specified array.- Specified by:
resetFromArrayin interfaceResettableChunk<T>- Specified by:
resetFromArrayin interfaceResettableWritableChunk<T>- Parameters:
array- The arrayoffset- The offset into arraycapacity- The capacity this should have after reset- Returns:
- this
-
resetFromArray
Description copied from interface:ResettableChunkReset the data and bounds of this chunk to the entire range of the specified array.- Specified by:
resetFromArrayin interfaceResettableChunk<T>- Specified by:
resetFromArrayin interfaceResettableWritableChunk<T>- Parameters:
array- The array- Returns:
- this
-
clear
Description copied from interface:ResettableChunkReset this chunk to empty storage.- Specified by:
clearin interfaceResettableChunk<T>- Specified by:
clearin interfaceResettableWritableChunk<T>
-
resetFromTypedChunk
public <ATTR extends ATTR_BASE> WritableObjectChunk<T,ATTR> resetFromTypedChunk(WritableObjectChunk<T, ATTR> other, int offset, int capacity) -
resetFromTypedArray
public <ATTR extends ATTR_BASE> WritableObjectChunk<T,ATTR> resetFromTypedArray(T[] data, int offset, int capacity)
-