Package org.opendaylight.yangtools.util
Class SingletonSpliterators
java.lang.Object
org.opendaylight.yangtools.util.SingletonSpliterators
Utility methods for instantiating
Spliterator
s containing a single element.- Author:
- Robert Varga
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Spliterator
<T> immutableOf
(T element) Create a newSpliterator
reporting specified element.static <@Nullable T>
Spliterator<T> Create a newSpliterator
reporting anull
element.
-
Method Details
-
immutableOf
Create a newSpliterator
reporting specified element. It has the following characteristics:- Type Parameters:
T
- the type of elements returned by this Spliterator- Parameters:
element
- Single element to report- Returns:
- A new spliterator
- Throws:
NullPointerException
- if element is null
-
immutableOfNull
Create a newSpliterator
reporting anull
element. It has the following characteristics:- Returns:
- A new spliterator
-