Class Overview
Additional utilities for creating Stream streams.
Summary
| Public Methods |
|
@Nonnull
static
<T>
Stream<T>
|
streamEnumeration(Enumeration<T> enumeration)
Converts an Enumeration to a Stream.
|
|
@Nonnull
static
<T>
Stream<T>
|
streamIterable(Iterable<T> iterable)
Converts an Iterable to a Stream.
|
|
@Nonnull
static
<T>
Stream<T>
|
streamOptional(Optional<T> optional)
Converts an Optional to a single-element or empty Stream.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
Public Methods
@Nonnull
public
static
Stream<T>
streamEnumeration
(Enumeration<T> enumeration)
Converts an Enumeration to a Stream.
Parameters
| enumeration
| the Enumeration to stream |
Returns
- a
Stream over the provided enumeration
@Nonnull
public
static
Stream<T>
streamIterable
(Iterable<T> iterable)
Converts an Iterable to a Stream.
Parameters
| iterable
| the Iterable to stream |
Returns
- a
Stream over the provided iterable
@Nonnull
public
static
Stream<T>
streamOptional
(Optional<T> optional)
Converts an Optional to a single-element or empty Stream.
Parameters
| optional
| the Optional to stream |
Returns
- a single-element
Stream if the Optional is present; otherwise an empty Stream