Interface ResettableChunk<ATTR_BASE extends Any>

All Superinterfaces:
Chunk<ATTR_BASE>
All Known Subinterfaces:
ResettableReadOnlyChunk<ATTR_BASE>, ResettableWritableChunk<ATTR_BASE>
All Known Implementing Classes:
ResettableBooleanChunk, ResettableByteChunk, ResettableCharChunk, ResettableDoubleChunk, ResettableFloatChunk, ResettableIntChunk, ResettableLongChunk, ResettableObjectChunk, ResettableShortChunk, ResettableWritableBooleanChunk, ResettableWritableByteChunk, ResettableWritableCharChunk, ResettableWritableDoubleChunk, ResettableWritableFloatChunk, ResettableWritableIntChunk, ResettableWritableLongChunk, ResettableWritableObjectChunk, ResettableWritableShortChunk

public interface ResettableChunk<ATTR_BASE extends Any> extends Chunk<ATTR_BASE>
WritableChunk that may have its backing storage reset to a slice of that belonging to another WritableChunk or a native array.
  • Method Details

    • resetFromChunk

      <ATTR extends ATTR_BASE> Chunk<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 specified WritableChunk.
      Parameters:
      other - The other WritableChunk
      offset - The offset into other
      capacity - The capacity this should have after reset
      Returns:
      this
    • resetFromArray

      <ATTR extends ATTR_BASE> Chunk<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.
      Parameters:
      array - The array
      offset - The offset into array
      capacity - The capacity this should have after reset
      Returns:
      this
    • resetFromArray

      <ATTR extends ATTR_BASE> Chunk<ATTR> resetFromArray(Object array)
      Reset the data and bounds of this chunk to the entire range of the specified array.
      Parameters:
      array - The array
      Returns:
      this
    • clear

      <ATTR extends ATTR_BASE> Chunk<ATTR> clear()
      Reset this chunk to empty storage.