public class YamlKeys extends Object
Internally, this class employs a dynamic array resizing strategy to accommodate varying numbers of offsets without a significant overhead in space.
| Constructor and Description |
|---|
YamlKeys() |
| Modifier and Type | Method and Description |
|---|---|
int |
count()
Returns the current number of offsets stored in the collection.
|
long[] |
offsets()
Retrieves all the stored offsets.
|
void |
push(long offset)
Adds a new offset to the collection.
|
void |
removeIndex(int i)
Removes the offset at the specified index.
|
void |
reset()
Resets the count of offsets to zero.
|
public void push(long offset)
offset - The offset value to be added.public int count()
public long[] offsets()
public void reset()
public void removeIndex(int i)
Subsequent offsets are shifted to the left (their indices decrease by one).
i - The index of the offset to be removed.Copyright © 2024. All rights reserved.