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 ([email protected])
-
-
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 boolean
allMatch(Predicate<? super YamlNode> predicate)
default boolean
anyMatch(Predicate<? super YamlNode> predicate)
default void
close()
default <R> R
collect(Supplier<R> supplier, BiConsumer<R,? super YamlNode> accumulator, BiConsumer<R,R> combiner)
default <R,A>
Rcollect(Collector<? super YamlNode,A,R> collector)
default Comment
comment()
Comment referring to this Node.default long
count()
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 DoubleStream
flatMapToDouble(Function<? super YamlNode,? extends DoubleStream> mapper)
default IntStream
flatMapToInt(Function<? super YamlNode,? extends IntStream> mapper)
default LongStream
flatMapToLong(Function<? super YamlNode,? extends LongStream> mapper)
default void
forEach(Consumer<? super YamlNode> action)
default void
forEachOrdered(Consumer<? super YamlNode> action)
default boolean
isParallel()
default Iterator<YamlNode>
iterator()
default Stream<YamlNode>
limit(long maxSize)
default <R> Stream<R>
map(Function<? super YamlNode,? extends R> mapper)
default DoubleStream
mapToDouble(ToDoubleFunction<? super YamlNode> mapper)
default IntStream
mapToInt(ToIntFunction<? super YamlNode> mapper)
default LongStream
mapToLong(ToLongFunction<? super YamlNode> mapper)
default Optional<YamlNode>
max(Comparator<? super YamlNode> comparator)
default Optional<YamlNode>
min(Comparator<? super YamlNode> comparator)
default boolean
noneMatch(Predicate<? super YamlNode> predicate)
default Stream<YamlNode>
onClose(Runnable closeHandler)
default Stream<YamlNode>
parallel()
default Stream<YamlNode>
peek(Consumer<? super YamlNode> action)
default YamlNode
reduce(YamlNode identity, BinaryOperator<YamlNode> accumulator)
default Optional<YamlNode>
reduce(BinaryOperator<YamlNode> accumulator)
default <U> U
reduce(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:YamlNode
Comment referring to this Node.
-
iterator
default Iterator<YamlNode> iterator()
- Specified by:
iterator
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
spliterator
default Spliterator<YamlNode> spliterator()
- Specified by:
spliterator
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
isParallel
default boolean isParallel()
- Specified by:
isParallel
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
sequential
default Stream<YamlNode> sequential()
- Specified by:
sequential
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
parallel
default Stream<YamlNode> parallel()
- Specified by:
parallel
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
unordered
default Stream<YamlNode> unordered()
- Specified by:
unordered
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
onClose
default Stream<YamlNode> onClose(Runnable closeHandler)
- Specified by:
onClose
in interfaceBaseStream<YamlNode,Stream<YamlNode>>
-
close
default void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in 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:
mapToDouble
in 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:
flatMapToInt
in interfaceStream<YamlNode>
-
flatMapToLong
default LongStream flatMapToLong(Function<? super YamlNode,? extends LongStream> mapper)
- Specified by:
flatMapToLong
in interfaceStream<YamlNode>
-
flatMapToDouble
default DoubleStream flatMapToDouble(Function<? super YamlNode,? extends DoubleStream> mapper)
- Specified by:
flatMapToDouble
in interfaceStream<YamlNode>
-
sorted
default Stream<YamlNode> sorted(Comparator<? super YamlNode> comparator)
-
forEachOrdered
default void forEachOrdered(Consumer<? super YamlNode> action)
- Specified by:
forEachOrdered
in 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)
-
-