Interface LArrayAccessor<P>

All Known Implementing Classes:
ListAccessor

public interface LArrayAccessor<P>
Provides access to the elements inside very large or small arrays. Designed to provide efficient access if the data is compressed or not. As a convenience, a function is provided for creating a copy of the elements.
  • Method Summary

    Modifier and Type Method Description
    void copy​(P src, P dst)
    Copies src into dst
    void getCopy​(int index, P dst)
    Copies the element at 'index' into 'dst'.
    Class<P> getElementType()
    Data type of element
    P getTemp​(int index)
    Returns an instance of P which has the value of the element at 'index'.
    int size()
    Number of elements in the set
  • Method Details

    • getTemp

      P getTemp​(int index)
      Returns an instance of P which has the value of the element at 'index'. Note that the accessor will own the data type which is returned and can modify it on the next call.

      This design is intended to be efficient when a massive array that's compressed and a very small array which is not compressed is used.

    • getCopy

      void getCopy​(int index, P dst)
      Copies the element at 'index' into 'dst'. Only use if a copy is required.
    • copy

      void copy​(P src, P dst)
      Copies src into dst
    • size

      int size()
      Number of elements in the set
    • getElementType

      Class<P> getElementType()
      Data type of element