Class MemoryRange<T extends org.apache.datasketches.memory.Memory>


  • public class MemoryRange<T extends org.apache.datasketches.memory.Memory>
    extends Object
    Reference to a particular region of some Memory. This is used because it is cheaper to reuse this object rather than calling Memory.region(long, long) for each row. Not immutable. The pointed-to range may change as this object gets reused.
    • Constructor Detail

      • MemoryRange

        public MemoryRange​(T memory,
                           long start,
                           long length)
    • Method Detail

      • memory

        public T memory()
        Returns the underlying memory *without* clipping it to this particular range. Callers must apply the offset given by start and capacity given by length.
      • start

        public long start()
      • length

        public long length()
      • set

        public void set​(T memory,
                        long start,
                        long length)