Class AttributeStreamOfDbl

java.lang.Object
com.esri.core.geometry.AttributeStreamBase
com.esri.core.geometry.AttributeStreamOfDbl

final class AttributeStreamOfDbl extends AttributeStreamBase
  • Field Details

    • m_buffer

      private double[] m_buffer
    • m_size

      private int m_size
  • Constructor Details

    • AttributeStreamOfDbl

      public AttributeStreamOfDbl(int size)
    • AttributeStreamOfDbl

      public AttributeStreamOfDbl(int size, double defaultValue)
    • AttributeStreamOfDbl

      public AttributeStreamOfDbl(AttributeStreamOfDbl other)
    • AttributeStreamOfDbl

      public AttributeStreamOfDbl(AttributeStreamOfDbl other, int maxSize)
  • Method Details

    • size

      public int size()
    • reserve

      public void reserve(int reserve)
    • capacity

      public int capacity()
    • read

      public double read(int offset)
      Reads a value from the buffer at given offset.
      Parameters:
      offset - is the element number in the stream.
    • get

      public double get(int offset)
    • write

      public void write(int offset, double value)
      Overwrites given element with new value.
      Parameters:
      offset - is the element number in the stream.
      value - is the value to write.
    • set

      public void set(int offset, double value)
    • read

      public void read(int offset, Point2D outPoint)
      Reads a value from the buffer at given offset.
      Parameters:
      offset - is the element number in the stream.
    • write

      void write(int offset, Point2D point)
      Overwrites given element with new value.
      Parameters:
      offset - is the element number in the stream.
      value - is the value to write.
    • add

      public void add(double v)
      Adds a new value at the end of the stream.
    • restrictedClone

      public AttributeStreamBase restrictedClone(int maxsize)
      Description copied from class: AttributeStreamBase
      Creats a copy of the stream that contains upto maxsize elements.
      Specified by:
      restrictedClone in class AttributeStreamBase
    • virtualSize

      public int virtualSize()
      Description copied from class: AttributeStreamBase
      Returns the number of elements in the stream.
      Specified by:
      virtualSize in class AttributeStreamBase
    • estimateMemorySize

      public long estimateMemorySize()
      Description copied from class: AttributeStreamBase
      Returns an estimate of this object size in bytes.
      Specified by:
      estimateMemorySize in class AttributeStreamBase
      Returns:
      Returns an estimate of this object size in bytes.
    • getPersistence

      public int getPersistence()
      Description copied from class: AttributeStreamBase
      Returns the Persistence type of the stream.
      Specified by:
      getPersistence in class AttributeStreamBase
    • readAsDbl

      public double readAsDbl(int offset)
      Description copied from class: AttributeStreamBase
      Reads given element and returns it as double.
      Specified by:
      readAsDbl in class AttributeStreamBase
    • readAsInt

      public int readAsInt(int offset)
      Description copied from class: AttributeStreamBase
      Reads given element and returns it as int (truncated if double).
      Specified by:
      readAsInt in class AttributeStreamBase
    • readAsInt64

      public long readAsInt64(int offset)
      Description copied from class: AttributeStreamBase
      Reads given element and returns it as int (truncated if double).
      Specified by:
      readAsInt64 in class AttributeStreamBase
    • resize

      public void resize(int newSize)
      Description copied from class: AttributeStreamBase
      Resizes the AttributeStream to the new size.
      Specified by:
      resize in class AttributeStreamBase
    • resizePreserveCapacity

      public void resizePreserveCapacity(int newSize)
      Description copied from class: AttributeStreamBase
      Resizes the AttributeStream to the new size. Does not change the capacity of the stream.
      Specified by:
      resizePreserveCapacity in class AttributeStreamBase
    • resize

      public void resize(int newSize, double defaultValue)
      Description copied from class: AttributeStreamBase
      Resizes the AttributeStream to the new size.
      Specified by:
      resize in class AttributeStreamBase
    • writeAsDbl

      public void writeAsDbl(int offset, double d)
      Description copied from class: AttributeStreamBase
      Writes given element as double. The double is cast to the internal representation (truncated when int).
      Specified by:
      writeAsDbl in class AttributeStreamBase
    • writeAsInt64

      public void writeAsInt64(int offset, long d)
      Description copied from class: AttributeStreamBase
      Writes given element as int. The int is cast to the internal representation.
      Specified by:
      writeAsInt64 in class AttributeStreamBase
    • writeAsInt

      public void writeAsInt(int offset, int d)
      Description copied from class: AttributeStreamBase
      Writes given element as int. The int is cast to the internal representation.
      Specified by:
      writeAsInt in class AttributeStreamBase
    • setEnvelopeFromPoints

      public void setEnvelopeFromPoints(int pointCount, Envelope2D inOutEnv)
      Sets the envelope from the attribute stream. The attribute stream stores interleaved x and y. The envelope will be set to empty if the pointCount is zero.
    • calculateHashImpl

      public int calculateHashImpl(int hashCodeIn, int start, int end)
      Specified by:
      calculateHashImpl in class AttributeStreamBase
    • equals

      public boolean equals(AttributeStreamBase other, int start, int end)
      Specified by:
      equals in class AttributeStreamBase
    • addRange

      public void addRange(AttributeStreamBase src, int start, int count, boolean bForward, int stride)
      Description copied from class: AttributeStreamBase
      Adds a range of elements from the source stream. The streams must be of the same type.
      Specified by:
      addRange in class AttributeStreamBase
      Parameters:
      src - The source stream to read elements from.
      start - The index of the element in the source stream to start reading from.
      count - The number of elements to add.
      bForward - True if adding the elements in order of the incoming source stream. False if adding the elements in reverse.
      stride - The number of elements to be grouped together if adding the elements in reverse.
    • insertRange

      public void insertRange(int start, AttributeStreamBase src, int srcStart, int count, boolean bForward, int stride, int validSize)
      Description copied from class: AttributeStreamBase
      Inserts a range of elements from the source stream. The streams must be of the same type.
      Specified by:
      insertRange in class AttributeStreamBase
      Parameters:
      start - The index where to start the insert.
      src - The source stream to read elements from.
      srcStart - The index of the element in the source stream to start reading from.
      count - The number of elements to read from the source stream.
      validSize - The number of valid elements in this stream.
    • insertRange

      public void insertRange(int start, double value, int count, int validSize)
      Description copied from class: AttributeStreamBase
      Inserts a range of elements of the given value.
      Specified by:
      insertRange in class AttributeStreamBase
      Parameters:
      start - The index where to start the insert.
      value - The value to be inserted.
      count - The number of elements to be inserted.
      validSize - The number of valid elements in this stream.
    • insertAttributes

      public void insertAttributes(int start, Point pt, int semantics, int validSize)
      Description copied from class: AttributeStreamBase
      Inserts the attributes of a given semantics from a Point geometry.
      Specified by:
      insertAttributes in class AttributeStreamBase
      Parameters:
      start - The index where to start the insert.
      pt - The Point geometry holding the attributes to be inserted.
      semantics - The attribute semantics that are being inserted.
      validSize - The number of valid elements in this stream.
    • insert

      public void insert(int index, Point2D point, int validSize)
    • writeRange

      public void writeRange(int streamOffset, int count, double[][] src, int arrayOffset, boolean bForward)
    • writeRange

      public void writeRange(int streamOffset, int count, double[] src, int arrayOffset, boolean bForward)
    • readRange

      public void readRange(int streamOffset, int count, double[][] dst, int arrayOffset, boolean bForward)
    • eraseRange

      public void eraseRange(int index, int count, int validSize)
      Description copied from class: AttributeStreamBase
      Erases a range from the buffer and defragments the result.
      Specified by:
      eraseRange in class AttributeStreamBase
      Parameters:
      index - The index in this stream where the erasing starts.
      count - The number of elements to be erased.
      validSize - The number of valid elements in this stream.
    • readRange

      public void readRange(int srcStart, int count, ByteBuffer dst, int dstOffset, boolean bForward)
      Description copied from class: AttributeStreamBase
      Write a range of elements to the source byte buffer.
      Specified by:
      readRange in class AttributeStreamBase
      Parameters:
      srcStart - The element index to start writing from.
      count - The number of AttributeStream elements to write.
      dst - The destination ByteBuffer. The buffer must be large enough or it will throw.
      dstOffset - The offset in the destination ByteBuffer to start write elements from.
    • reverseRange

      public void reverseRange(int index, int count, int stride)
      Description copied from class: AttributeStreamBase
      Reverses a range from the buffer.
      Specified by:
      reverseRange in class AttributeStreamBase
      Parameters:
      index - The index in this stream where the reversing starts.
      count - The number of elements to be reversed.
      stride - The number of elements to be grouped together when doing the reverse.
    • setRange

      public void setRange(double value, int start, int count)
      Description copied from class: AttributeStreamBase
      Sets a range of values to given value.
      Specified by:
      setRange in class AttributeStreamBase
      Parameters:
      value - The value to set stream elements to.
      start - The index of the element to start writing to.
      count - The number of elements to set.
    • writeRange

      public void writeRange(int startElement, int count, AttributeStreamBase _src, int srcStart, boolean bForward, int stride)
      Description copied from class: AttributeStreamBase
      Adds a range of elements from the source byte buffer. This stream is resized automatically to accomodate required number of elements.
      Specified by:
      writeRange in class AttributeStreamBase
      Parameters:
      startElement - the index of the element in this stream to start setting elements from.
      count - The number of AttributeStream elements to read.
      _src - The source ByteBuffer to read elements from.
      srcStart - The offset from the start of the ByteBuffer in bytes.
      bForward - When False, the source is written in reversed order.
      stride - Used for reversed writing only to indicate the unit of writing. elements inside a stride are not reversed. Only the strides are reversed.
    • _selfWriteRangeImpl

      private void _selfWriteRangeImpl(int toElement, int count, int fromElement, boolean bForward, int stride)
    • writeRange

      public void writeRange(int startElement, int count, ByteBuffer src, int offsetBytes, boolean bForward)
      Description copied from class: AttributeStreamBase
      Adds a range of elements from the source byte buffer. The stream is resized automatically to accomodate required number of elements.
      Specified by:
      writeRange in class AttributeStreamBase
      Parameters:
      startElement - the index of the element in this stream to start setting elements from.
      count - The number of AttributeStream elements to read.
      src - The source ByteBuffer to read elements from.
      offsetBytes - The offset from the start of the ByteBuffer in bytes.
    • writeRange

      public void writeRange(int streamOffset, int pointCount, Point2D[] src, int arrayOffset, boolean bForward)
    • readRange

      public void readRange(int srcStart, int count, double[] dst, int dstOffset, boolean bForward)
    • sort

      public void sort(int start, int end)