| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private byte | |
| private int | |
| private final @NotNull List | |
| private final @NotNull IPositionUpdater |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(T
to insert after the current position in the list, not at the end of the list as a regular List does.
throws IllegalStateException if current index is not valid element)Implements com.
|
| public boolean | add(int
offset, can be negative. 0 means insert before current, 1 means after current, -1 means before previous offset, T to insert element)Implements com. Add element at position given by relative offset to current position. |
| public boolean | |
| public boolean | |
| public boolean | append(T element)
Implements com.
|
| public Iterable | backwards()
Implements com. Iterable for this position and all previous positions in decreasing index order |
| public void | deleted(int
at which delete was performed, list contents and size at this point are already updated index, int of elements deleted count)Implements com. delete Notification |
| public void | detachListener()
Implements com. Tells listener to remove itself from parent NOTE: used as optimization in iterators which are guaranteed not to have any other references to their position element. |
| public final boolean | equals(Object
the reference object with which to compare. o)Overrides java. Implements com. Listeners should not change hashCode() or equals() from their default implementation where the instance is only equal to itself. |
| public Iterable | forwards()
Implements com. iterable for this position and all following positions in increasing index order |
| public T | |
| public T | get(int
relative to this position, absolute index [0, size()], if absolute index == size() then element is added at the end of the list. The latter is also considered an insert at size() index. offset)Implements com. Insert element at index |
| public @NotNull PositionAnchor | getAnchor()
Implements com. Position Anchor for this position |
| public int | getIndex()
Implements com. FIX: allow getIndex(offset) to return -1 |
| public int | getIndex(int
offset to current position
offset)FIX: allow getIndex(offset) to return -1 Implements com.
|
| public T | |
| public T | getOrNull(int
relative to this position, absolute index [0, size()], if absolute index == size() then element is added at the end of the list. The latter is also considered an insert at size() index. offset)Implements com. Insert element at index |
| public <S extends T> S | getOrNull(Class<S>
class of element desired elementClass)Implements com. Get the requested class or null if element at position cannot be cast to this class |
| public <S extends T> S | getOrNull(int
relative to this position, absolute index [0, size()], if absolute index == size() then element is added at the end of the list. The latter is also considered an insert at size() index. offset, Class<S> class of element desired elementClass)Implements com. Get the requested class or null if element at position cannot be cast to this class |
| public P | getPosition(int
index relative to current position, <0 previous elements, 0 means current, >0 following elements offset)Implements com.
|
| public final int | hashCode()
Overrides java. Implements com. Listeners should not change hashCode() or equals() from their default implementation where the instance is only equal to itself. |
| public boolean | |
| public boolean | |
| public P | |
| public P | indexOf(int offset, T o)
Implements com.
|
| public P | indexOf(@NotNull Predicate<P> predicate)
Implements com.
|
| public P | indexOf(int offset, @NotNull Predicate<P> predicate)
Implements com.
|
| public void | inserted(int
position of insert index, int number of elements inserted count)Implements com. Anchor position effect on insert/delete,
|
| public void | invalidate()
Implements com. Mark position as not valid may be useful for something. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public P | |
| public P | lastIndexOf(int offset, T o)
Implements com.
|
| public P | lastIndexOf(@NotNull Predicate<P> predicate)
Implements com.
|
| public P | lastIndexOf(int offset, @NotNull Predicate<P> predicate)
Implements com.
|
| public int | |
| public int | |
| public P | next()
Implements com. Get next index position relative to current, returns next position if it exists even when this position is not valid |
| public Iterable | nextForwards()
Implements com. Iterator for all following positions, excluding this position in increasing index order |
| public int | nextIndex()
Implements com. Returns the index of the element that would be returned by a
subsequent call to |
| public P | nextOrNull()
Implements com. Return valid next position, with the same position anchor as this position, or null if does not exist. |
| public P | previous()
Implements com. Get previous index position relative to current, returns previous index if it exists even when this position is not valid |
| public Iterable | previousBackwards()
Implements com. iterable for all previous positions, excluding this position in decreasing index order |
| public int | previousIndex()
Implements com. Returns the index of the element that would be returned by a
subsequent call to |
| public P | previousOrNull()
Implements com. Return valid previous position, with the same position anchor as this position, or null if does not exist. |
| public T | |
| public T | remove(int offset)
Implements com.
|
| public void | remove(int startOffset, int endOffset)
Implements com.
|
| public void | set(T
to which to set the current element in the list
throws IllegalStateException if current index is not valid
element)If the current index is after the last element this will add the value to the end of the list treating as an insert, with corresponding updates to any positions that this would affect. Implements com.
|
| public T | set(int
relative to this position, absolute index [0, size()], if absolute index == size() then element is added at the end of the list. The latter is considered an insert at the index. offset, T value to set at offset element)Implements com. Set element at given index |
| public void | setDetached()
Implements com. Tells the listener it has been detached by its parent list NOTE: used as optimization in position list frames to detach any positions which have not been unframed() |
| private void | |
| public int | |
| public String | |
| public void | unframed()
Implements com. Mark this position as used outside the iteration frame in which it was created. |
| private void | |
| private void | |
| private void | |
| private void | validateWithElementIndex(int index, int offset)
throw if not valid or index is out list index range of element indices |
| private void | |
| public P |