Class BooleanChunk<ATTR extends Attributes.Any>

java.lang.Object
com.illumon.iris.db.v2.sources.chunk.ChunkBase<ATTR>
com.illumon.iris.db.v2.sources.chunk.BooleanChunk<ATTR>
All Implemented Interfaces:
Chunk<ATTR>
Direct Known Subclasses:
BooleanChunkPage, ResettableBooleanChunk, WritableBooleanChunk

public class BooleanChunk<ATTR extends Attributes.Any>
extends ChunkBase<ATTR>
Chunk implementation for boolean data.
  • Constructor Details

    • BooleanChunk

      protected BooleanChunk​(boolean[] data, int offset, int capacity)
  • Method Details

    • getEmptyChunk

      public static <ATTR extends Attributes.Any> BooleanChunk<ATTR> getEmptyChunk()
    • makeArray

      public static boolean[] makeArray​(int capacity)
    • chunkWrap

      public static <ATTR extends Attributes.Any> BooleanChunk<ATTR> chunkWrap​(boolean[] data)
    • chunkWrap

      public static <ATTR extends Attributes.Any> BooleanChunk<ATTR> chunkWrap​(boolean[] data, int offset, int capacity)
    • getChunkType

      public final ChunkType getChunkType()
      Returns:
      The underlying chunk type
    • get

      public final boolean get​(int index)
    • slice

      public BooleanChunk<ATTR> slice​(int offset, int capacity)
      Description copied from interface: Chunk
      Make 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).
      Parameters:
      offset - Offset of the new Chunk, relative to this Chunk. 0 ≤ offset ≤ this.size
      capacity - 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.
    • copyToChunk

      public final void copyToChunk​(int srcOffset, WritableChunk<? super ATTR> dest, int destOffset, int length)
      Description copied from interface: Chunk
      Copy a subrange of this Chunk to the subrange of the 'dest' writable chunk.
      Parameters:
      srcOffset - Starting position in 'this' (the source)
      dest - Destination writable chunk.
      destOffset - Starting offset in the destination.
      length - Number of values to copy
    • copyToArray

      public final void copyToArray​(int srcOffset, Object dest, int destOffset, int length)
      Description copied from interface: Chunk
      Copy a subrange of this Chunk to the subrange of the 'dest' array.
      Parameters:
      srcOffset - Starting position in 'this' (the source)
      dest - Destination array.
      destOffset - Starting offset in the destination.
      length - Number of values to copy
    • copyToTypedArray

      public final void copyToTypedArray​(int srcOffset, boolean[] destData, int destOffset, int length)
    • isAlias

      public final boolean isAlias​(Object array)
      Returns:
      true iff this and array are aliases, that is they refer to the same underlying data
    • isAlias

      public final boolean isAlias​(Chunk chunk)
      Returns:
      true iff this and chunk are aliases, that is they refer to the same underlying data
    • downcast

      public static <ATTR extends Attributes.Any,​ ATTR_DERIV extends ATTR> WritableBooleanChunk<ATTR_DERIV> downcast​(WritableBooleanChunk<ATTR> self)