Provides a pointed stream, which is a non-empty zipper-like stream structure that tracks an index (focus) position in a stream. Focus can be moved forward and backwards through the stream, elements can be inserted before or after the focused position, and the focused item can be deleted.
Based on the pointedlist library by Jeff Wheeler.
- Companion
- object
Value members
Concrete methods
Whether the focus is on the last element in the zipper.
Whether the focus is on the last element in the zipper.
Whether the focus is on the first element in the zipper.
Whether the focus is on the first element in the zipper.
Deletes the element at focus and moves the focus to the left. If there is no element on the left, focus is moved to the right.
Deletes the element at focus and moves the focus to the left. If there is no element on the left, focus is moved to the right.
Deletes the focused element and moves focus to the left. If the focus was on the first element, focus is moved to the last element.
Deletes the focused element and moves focus to the left. If the focus was on the first element, focus is moved to the last element.
Deletes the focused element and moves focus to the left. If the focus was on the first element, focus is moved to the last element.
Deletes the focused element and moves focus to the left. If the focus was on the first element, focus is moved to the last element.
Deletes the element at focus and moves the focus to the left. If there is no element on the left, focus is moved to the right.
Deletes the element at focus and moves the focus to the left. If there is no element on the left, focus is moved to the right.
Deletes the element at focus and moves the focus to the right. If there is no element on the right, focus is moved to the left.
Deletes the element at focus and moves the focus to the right. If there is no element on the right, focus is moved to the left.
Deletes the focused element and moves focus to the right. If the focus was on the last element, focus is moved to the first element.
Deletes the focused element and moves focus to the right. If the focus was on the last element, focus is moved to the first element.
Deletes the focused element and moves focus to the right. If the focus was on the last element, focus is moved to the first element.
Deletes the focused element and moves focus to the right. If the focus was on the last element, focus is moved to the first element.
Deletes the element at focus and moves the focus to the right. If there is no element on the right, focus is moved to the left.
Deletes the element at focus and moves the focus to the right. If there is no element on the right, focus is moved to the left.
Given a traversal function, find the first element along the traversal that matches a given predicate.
Given a traversal function, find the first element along the traversal that matches a given predicate.
Moves focus to the nearest element on the right that matches the given predicate, or Maybe.empty if there is no such element.
Moves focus to the nearest element on the right that matches the given predicate, or Maybe.empty if there is no such element.
Moves focus to the previous element on the left that matches the given predicate, or Maybe.empty if there is no such element.
Moves focus to the previous element on the left that matches the given predicate, or Maybe.empty if there is no such element.
Moves focus to the nearest element matching the given predicate, preferring the left, or Maybe.empty if no element matches.
Moves focus to the nearest element matching the given predicate, preferring the left, or Maybe.empty if no element matches.
Moves focus to the nearest element matching the given predicate, preferring the left, or the default if no element matches.
Moves focus to the nearest element matching the given predicate, preferring the left, or the default if no element matches.
Inserts an element to the left of focus and focuses on the new element.
Inserts an element to the left of focus and focuses on the new element.
Inserts an element to the right of focus and focuses on the new element.
Inserts an element to the right of focus and focuses on the new element.
Moves focus n elements in the zipper, or Maybe.empty if there is no such element.
Moves focus n elements in the zipper, or Maybe.empty if there is no such element.
- Value Params
- n
number of elements to move (positive is forward, negative is backwards)
Moves focus to the nth element of the zipper, or the default if there is no such element.
Moves focus to the nth element of the zipper, or the default if there is no such element.
Possibly moves to next element to the right of focus.
Possibly moves to next element to the right of focus.
Moves focus to the next element. If the last element is currently focused, loop to the first element.
Moves focus to the next element. If the last element is currently focused, loop to the first element.
Possibly moves to next element to the right of focus.
Possibly moves to next element to the right of focus.
A zipper of all positions of the zipper, with focus on the current position.
A zipper of all positions of the zipper, with focus on the current position.
Possibly moves to the previous element to the left of focus.
Possibly moves to the previous element to the left of focus.
Moves focus to the previous element. If the first element is currently focused, loop to the last element.
Moves focus to the previous element. If the first element is currently focused, loop to the last element.
Possibly moves to previous element to the left of focus.
Possibly moves to previous element to the left of focus.
Get the Stream representation of this Zipper. This fully traverses lefts
. rights
is
not evaluated.
Get the Stream representation of this Zipper. This fully traverses lefts
. rights
is
not evaluated.