gnu.lists
public class GapVector extends AbstractSequence implements Sequence
| Field Summary | |
|---|---|
| SimpleVector | base |
| int | gapEnd |
| int | gapStart |
| Constructor Summary | |
|---|---|
| GapVector(SimpleVector base) | |
| protected | GapVector() |
| Method Summary | |
|---|---|
| void | add(int index, Object o) |
| protected int | addPos(int ipos, Object value) |
| void | consumePosRange(int iposStart, int iposEnd, Consumer out) |
| int | createPos(int index, boolean isAfter) |
| void | fill(Object value) |
| void | fillPosRange(int fromPos, int toPos, Object value) |
| protected void | gapReserve(int size) Make sure gap is at least 'size' elements long. |
| protected void | gapReserve(int where, int size) Adjust gap to 'where', and make sure it is least `size' elements long. |
| Object | get(int index) |
| int | getNextKind(int ipos) |
| int | getSegment(int where, int len) If needed, move the gap so the given segment is contiguous. |
| boolean | hasNext(int ipos) |
| protected boolean | isAfterPos(int ipos) |
| protected int | nextIndex(int ipos) |
| protected void | removePosRange(int ipos0, int ipos1) |
| Object | set(int index, Object value) |
| protected void | shiftGap(int newGapStart) |
| int | size() |
Returns: the offset in the base array containing the segment, or -1 if the parameters are bad.