public class OffsetList extends Object
The algorithms here use traversal of the list segments rather than recursion to avoid using a lot of stack space.
| Modifier and Type | Class and Description |
|---|---|
static class |
OffsetList.Segment
One segment of a OffsetList containing at most SEGMENT_CAPACITY values.
|
| Constructor and Description |
|---|
OffsetList() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long value,
boolean checkDupOffsets)
Adds the given value and returns whether a new segment was allocated.
|
int |
size() |
long[] |
toArray()
Returns an array of all values as longs.
|
public boolean add(long value,
boolean checkDupOffsets)
public int size()
public long[] toArray()
Copyright © 2024. All rights reserved.