T - value typepublic static class Loop.Item<T> extends BasicLoop.Item<Loop.Item<T>>
loop, next, previous| Modifier | Constructor and Description |
|---|---|
protected |
Item(T value,
BasicLoop<Loop.Item<T>> loop,
Loop.Item<T> previous,
Loop.Item<T> next)
Create an item.
|
| Modifier and Type | Method and Description |
|---|---|
Loop.Item<T> |
findNextValue(java.util.function.Predicate<? super T> condition)
Find the next item for which its value fulfills a given condition.
|
Loop.Item<T> |
findPreviousValue(java.util.function.Predicate<? super T> condition)
Find the previous item for which its value fulfills a given condition.
|
T |
getValue()
Get the value.
|
T |
setValue(T newValue)
Exchange the value
|
java.lang.String |
toString() |
advanced, exchangeWith, findNext, findPrevious, getLoop, getNext, getPrevious, insertAfter, insertBefore, isValid, iteratorTo, minStepsTo, remove, stepsTo, swapPlacesprotected Item(@NotNull T value, @NotNull BasicLoop<Loop.Item<T>> loop, @Nullable Loop.Item<T> previous, @Nullable Loop.Item<T> next)
value - value contained in this itemloop - loop to which this item will belongprevious - previous item (or null if this is the first item)next - next item (or null if this is the first item)@NotNull public T setValue(@NotNull T newValue)
newValue - new value to set for this item@Nullable public Loop.Item<T> findNextValue(@NotNull java.util.function.Predicate<? super T> condition)
condition - value conditionnull if no item matches@Nullable public Loop.Item<T> findPreviousValue(@NotNull java.util.function.Predicate<? super T> condition)
condition - value conditionnull if no item matchespublic java.lang.String toString()
toString in class java.lang.Object