Package com.amihaiemil.eoyaml
Interface YamlStream
-
- All Superinterfaces:
AutoCloseable,BaseStream<YamlNode,Stream<YamlNode>>,Comparable<YamlNode>,Stream<YamlNode>,YamlNode
public interface YamlStream extends YamlNode, Stream<YamlNode>
A YAML Stream of documents. Documents are separated by 3 dashes (---).
This interface also offers integrations with Java 8's Stream API.
All the methods have a default implementations based on the YamlNode values Collection.- Since:
- 3.1.1
- Version:
- $Id: aad913b2279664e8464f5d0a6f56bb4658687351 $
- Author:
- Mihai Andronache (amihaiemil@gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T extends Object>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanallMatch(Predicate<? super YamlNode> predicate)default booleananyMatch(Predicate<? super YamlNode> predicate)default voidclose()default <R> Rcollect(Supplier<R> supplier, BiConsumer<R,? super YamlNode> accumulator, BiConsumer<R,R> combiner)default <R,A>
Rcollect(Collector<? super YamlNode,A,R> collector)default Commentcomment()Comment referring to this Node.default longcount()default Stream<YamlNode>distinct()default Stream<YamlNode>filter(Predicate<? super YamlNode> predicate)default Optional<YamlNode>findAny()default Optional<YamlNode>findFirst()default <R> Stream<R>flatMap(Function<? super YamlNode,? extends Stream<? extends R>> mapper)default DoubleStreamflatMapToDouble(Function<? super YamlNode,? extends DoubleStream> mapper)default IntStreamflatMapToInt(Function<? super YamlNode,? extends IntStream> mapper)default LongStreamflatMapToLong(Function<? super YamlNode,? extends LongStream> mapper)default voidforEach(Consumer<? super YamlNode> action)default voidforEachOrdered(Consumer<? super YamlNode> action)default booleanisParallel()default Iterator<YamlNode>iterator()default Stream<YamlNode>limit(long maxSize)default <R> Stream<R>map(Function<? super YamlNode,? extends R> mapper)default DoubleStreammapToDouble(ToDoubleFunction<? super YamlNode> mapper)default IntStreammapToInt(ToIntFunction<? super YamlNode> mapper)default LongStreammapToLong(ToLongFunction<? super YamlNode> mapper)default Optional<YamlNode>max(Comparator<? super YamlNode> comparator)default Optional<YamlNode>min(Comparator<? super YamlNode> comparator)default booleannoneMatch(Predicate<? super YamlNode> predicate)default Stream<YamlNode>onClose(Runnable closeHandler)default Stream<YamlNode>parallel()default Stream<YamlNode>peek(Consumer<? super YamlNode> action)default YamlNodereduce(YamlNode identity, BinaryOperator<YamlNode> accumulator)default Optional<YamlNode>reduce(BinaryOperator<YamlNode> accumulator)default <U> Ureduce(U identity, BiFunction<U,? super YamlNode,U> accumulator, BinaryOperator<U> combiner)default Stream<YamlNode>sequential()default Stream<YamlNode>skip(long n)default Stream<YamlNode>sorted()default Stream<YamlNode>sorted(Comparator<? super YamlNode> comparator)default Spliterator<YamlNode>spliterator()default Object[]toArray()default <A> A[]toArray(IntFunction<A[]> generator)default Stream<YamlNode>unordered()Collection<YamlNode>values()Fetch the values from this stream.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
values
Collection<YamlNode> values()
Fetch the values from this stream.- Returns:
- Collection of
YamlNode
-
comment
default Comment comment()
Description copied from interface:YamlNodeComment referring to this Node.
-
iterator
default Iterator<YamlNode> iterator()
- Specified by:
iteratorin interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
spliterator
default Spliterator<YamlNode> spliterator()
- Specified by:
spliteratorin interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
isParallel
default boolean isParallel()
- Specified by:
isParallelin interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
sequential
default Stream<YamlNode> sequential()
- Specified by:
sequentialin interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
parallel
default Stream<YamlNode> parallel()
- Specified by:
parallelin interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
unordered
default Stream<YamlNode> unordered()
- Specified by:
unorderedin interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
onClose
default Stream<YamlNode> onClose(Runnable closeHandler)
- Specified by:
onClosein interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
close
default void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
mapToInt
default IntStream mapToInt(ToIntFunction<? super YamlNode> mapper)
-
mapToLong
default LongStream mapToLong(ToLongFunction<? super YamlNode> mapper)
-
mapToDouble
default DoubleStream mapToDouble(ToDoubleFunction<? super YamlNode> mapper)
- Specified by:
mapToDoublein interfaceStream<YamlNode>
-
flatMap
default <R> Stream<R> flatMap(Function<? super YamlNode,? extends Stream<? extends R>> mapper)
-
flatMapToInt
default IntStream flatMapToInt(Function<? super YamlNode,? extends IntStream> mapper)
- Specified by:
flatMapToIntin interfaceStream<YamlNode>
-
flatMapToLong
default LongStream flatMapToLong(Function<? super YamlNode,? extends LongStream> mapper)
- Specified by:
flatMapToLongin interfaceStream<YamlNode>
-
flatMapToDouble
default DoubleStream flatMapToDouble(Function<? super YamlNode,? extends DoubleStream> mapper)
- Specified by:
flatMapToDoublein interfaceStream<YamlNode>
-
sorted
default Stream<YamlNode> sorted(Comparator<? super YamlNode> comparator)
-
forEachOrdered
default void forEachOrdered(Consumer<? super YamlNode> action)
- Specified by:
forEachOrderedin interfaceStream<YamlNode>
-
toArray
default <A> A[] toArray(IntFunction<A[]> generator)
-
reduce
default YamlNode reduce(YamlNode identity, BinaryOperator<YamlNode> accumulator)
-
reduce
default Optional<YamlNode> reduce(BinaryOperator<YamlNode> accumulator)
-
reduce
default <U> U reduce(U identity, BiFunction<U,? super YamlNode,U> accumulator, BinaryOperator<U> combiner)
-
collect
default <R> R collect(Supplier<R> supplier, BiConsumer<R,? super YamlNode> accumulator, BiConsumer<R,R> combiner)
-
min
default Optional<YamlNode> min(Comparator<? super YamlNode> comparator)
-
max
default Optional<YamlNode> max(Comparator<? super YamlNode> comparator)
-
-