Class LinkedNode<T>
- java.lang.Object
-
- org.hibernate.search.util.common.data.impl.LinkedNode<T>
-
-
Field Summary
Fields Modifier and Type Field Description LinkedNode<T>lastTvalue
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Optional<LinkedNode<T>>findAndReverse(Predicate<T> valuePredicate)Optional<LinkedNode<T>>findAndReverse(Predicate<T> valuePredicate, LinkedNode<T> head)inthashCode()Iterator<T>iterator()static <T> LinkedNode<T>of(T value)static <T> LinkedNode<T>of(T... values)Spliterator<T>spliterator()Stream<T>stream()StringtoString()LinkedNode<T>withHead(T headValue)
-
-
-
Field Detail
-
value
public final T value
-
last
public final LinkedNode<T> last
-
-
Method Detail
-
of
public static <T> LinkedNode<T> of(T value)
-
of
@SafeVarargs public static <T> LinkedNode<T> of(T... values)
-
spliterator
public Spliterator<T> spliterator()
- Specified by:
spliteratorin interfaceIterable<T>
-
withHead
public LinkedNode<T> withHead(T headValue)
-
findAndReverse
public Optional<LinkedNode<T>> findAndReverse(Predicate<T> valuePredicate)
- Parameters:
valuePredicate- A predicate to apply to node values.- Returns:
- An optional containing the path from the found node to the current head,
i.e. a reversed list of all values
from the first node to match the given predicate to the current head
(note: the list is purposely in reversed order compared to
this), or an empty optional if no matching value was found.
-
findAndReverse
public Optional<LinkedNode<T>> findAndReverse(Predicate<T> valuePredicate, LinkedNode<T> head)
-
-