T- item type
public class ResettableSingletonTraverser<T> extends Object implements Traverser<T>, java.util.function.Consumer<T>
Consumer<T>. Another item can be set at any time and the subsequent
next()call will consume it. However, if this traverser already has an item, it is illegal to set another one before consuming it.
|Constructor and Description|
|Modifier and Type||Method and Description|
Resets this traverser so that the following
Returns the next item in the sequence, or
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, dropWhile, filter, flatMap, map, onFirstNull, over, peek, prepend, takeWhile
public T next()
nullif there is no next item to return. If this traverser represents a finite sequence, it will keep returning
nullonce exhausted. If it represents an infinite sequence,
nullonly means "there is currently no next item", but trying again later may produce one.
next()call will return the item supplied here. If the traverser already has an item, it is illegal to call this method until that item is consumed by calling
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.