Package org.comroid.mutatio.pipe
Interface Pipe<I,O>
-
- All Superinterfaces:
java.lang.AutoCloseable,java.util.function.Consumer<I>,org.comroid.api.Disposable,Pipeable<O>,ReferenceIndex<O>
- All Known Subinterfaces:
Pump<O,T>
- All Known Implementing Classes:
BasicPipe,BasicPump,SortedResultingPipe
public interface Pipe<I,O> extends ReferenceIndex<O>, java.util.function.Consumer<I>, org.comroid.api.Disposable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.comroid.api.Disposable
org.comroid.api.Disposable.Basic, org.comroid.api.Disposable.Container, org.comroid.api.Disposable.MultipleExceptions
-
Nested classes/interfaces inherited from interface org.comroid.mutatio.pipe.Pipeable
Pipeable.From<T>
-
Nested classes/interfaces inherited from interface org.comroid.mutatio.ref.ReferenceIndex
ReferenceIndex.Support
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaccept(I input)<R> Pipe<O,R>addStage(StageAdapter<O,R> stage)static <T> Pipe<T,T>create()default Pipe<O,O>distinct()default Pipe<O,O>filter(java.util.function.Predicate<? super O> predicate)default @NotNull Processor<O>findAny()default @NotNull Processor<O>findFirst()default <R> Pipe<O,R>flatMap(java.util.function.Function<? super O,? extends Reference<? extends R>> mapper)default voidforEach(java.util.function.Consumer<? super O> action)StageAdapter<I,O>getAdapter()default booleanisSorted()default Pipe<O,O>limit(long maxSize)default <R> Pipe<O,R>map(java.util.function.Function<? super O,? extends R> mapper)static <T> Pipe<T,T>of(java.util.Collection<T> collection)default Pipe<O,O>peek(java.util.function.Consumer<? super O> action)default Pump<I,O>pump(java.util.concurrent.Executor executor)default booleanremove(O item)default Pipe<O,O>skip(long skip)default Pipe<O,O>sorted()default Pipe<O,O>sorted(java.util.Comparator<? super O> comparator)default Span<O>span()default java.util.List<O>unwrap()-
Methods inherited from interface org.comroid.api.Disposable
addChildren, close, closeContainer, dispose, disposeThrow, getChildren
-
Methods inherited from interface org.comroid.mutatio.ref.ReferenceIndex
add, clear, get, getReference, pipe, requireNonNull, requireNonNull, size, stream, subset, subset, wrap
-
-
-
-
Method Detail
-
getAdapter
StageAdapter<I,O> getAdapter()
-
isSorted
default boolean isSorted()
-
create
static <T> Pipe<T,T> create()
-
of
static <T> Pipe<T,T> of(java.util.Collection<T> collection)
-
unwrap
default java.util.List<O> unwrap()
- Specified by:
unwrapin interfaceReferenceIndex<I>
-
addStage
<R> Pipe<O,R> addStage(StageAdapter<O,R> stage)
-
flatMap
default <R> Pipe<O,R> flatMap(java.util.function.Function<? super O,? extends Reference<? extends R>> mapper)
-
forEach
default void forEach(java.util.function.Consumer<? super O> action)
-
remove
default boolean remove(O item) throws java.lang.UnsupportedOperationException
- Specified by:
removein interfaceReferenceIndex<I>- Throws:
java.lang.UnsupportedOperationException
-
accept
default void accept(I input)
- Specified by:
acceptin interfacejava.util.function.Consumer<I>
-
-