Interface LongArray
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
AbstractBlockPackedReader
,LongArray.DeferredLongArray
public interface LongArray extends java.io.Closeable
Abstraction over a long-indexed array of longs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LongArray.DeferredLongArray
static interface
LongArray.Factory
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
long
get(long idx)
Get value atidx
.long
indexOf(long value)
Using the given value returns the first index corresponding to the value.long
length()
Get array length.
-
-
-
Method Detail
-
get
long get(long idx)
Get value atidx
.
-
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 java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-