Interface LongArray

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractBlockPackedReader, LongArray.DeferredLongArray

public interface LongArray extends Closeable
Abstraction over a long-indexed array of longs.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    long
    get(long idx)
    Get value at idx.
    long
    indexOf(long value)
    Using the given value returns the first index corresponding to the value.
    long
    Get array length.
  • Method Details

    • get

      long get(long idx)
      Get value at idx.
    • length

      long length()
      Get array length.
    • indexOf

      long indexOf(long value)
      Using the given value returns the first index corresponding to the value.
      Parameters:
      value - Value to lookup, and it must not be smaller than previous value
      Returns:
      The index of the given value or negative value if target value is greater than all values
    • close

      default void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException