Class ImmutableDataStream<V>
java.lang.Object
org.moeaframework.analysis.stream.ImmutableDataStream<V>
- Type Parameters:
V
- the type of each value in the data stream
- All Implemented Interfaces:
Iterable<V>
,DataStream<V>
,Displayable
,Formattable<V>
A data stream storing the intermediate, materialized content of the stream.
-
Constructor Summary
ConstructorDescriptionConstructs a new, empty data stream.ImmutableDataStream
(Iterable<V> iterable) Constructs a new data stream with the given content.ImmutableDataStream
(List<V> list) Constructs a new data stream with the given content.ImmutableDataStream
(Stream<V> stream) Constructs a new data stream with the given content. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.analysis.stream.DataStream
any, asTabularData, distinct, enumerate, filter, first, groupBy, isEmpty, keyedOn, map, measure, reduce, reduce, single, singleOrDefault, skip, sorted, sorted, values, values
Methods inherited from interface org.moeaframework.util.format.Displayable
display
Methods inherited from interface org.moeaframework.util.format.Formattable
display, display, display, save, save, save
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ImmutableDataStream
public ImmutableDataStream()Constructs a new, empty data stream. -
ImmutableDataStream
Constructs a new data stream with the given content.- Parameters:
list
- the list of values
-
ImmutableDataStream
Constructs a new data stream with the given content.- Parameters:
stream
- the stream of values
-
ImmutableDataStream
Constructs a new data stream with the given content.- Parameters:
iterable
- the iterable of values
-
-
Method Details
-
size
public int size()Description copied from interface:DataStream
Returns the number of values in this data stream.- Specified by:
size
in interfaceDataStream<V>
- Returns:
- the number of values
-
stream
Description copied from interface:DataStream
Returns aStream
of the values in this data stream.- Specified by:
stream
in interfaceDataStream<V>
- Returns:
- the stream
-
iterator
-