Package org.comroid.mutatio.pipe
Class BasicPipe<O,T>
- java.lang.Object
-
- org.comroid.mutatio.pipe.BasicPipe<O,T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.function.Consumer<O>,org.comroid.api.Disposable,Pipe<O,T>,Pipeable<T>,ReferenceIndex<T>
- Direct Known Subclasses:
BasicPump,SortedResultingPipe
public class BasicPipe<O,T> extends java.lang.Object implements Pipe<O,T>
-
-
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
-
-
Field Summary
Fields Modifier and Type Field Description static intAUTOEMPTY_DISABLEDprotected ReferenceIndex<O>refs
-
Constructor Summary
Constructors Constructor Description BasicPipe(ReferenceIndex<O> old)BasicPipe(ReferenceIndex<O> old, int autoEmptyLimit)BasicPipe(ReferenceIndex<O> old, StageAdapter<O,T> adapter)BasicPipe(ReferenceIndex<O> old, StageAdapter<O,T> adapter, int autoEmptyLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(O other)booleanadd(T item)voidaddChildren(java.lang.AutoCloseable child)<R> Pipe<T,R>addStage(StageAdapter<T,R> stage)voidclear()Deletes all elementsStageAdapter<O,T>getAdapter()java.util.Collection<? extends java.lang.AutoCloseable>getChildren()Reference<T>getReference(int index)Pipe<?,T>pipe()intsize()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.comroid.api.Disposable
close, closeContainer, dispose, disposeThrow
-
Methods inherited from interface org.comroid.mutatio.pipe.Pipe
distinct, filter, findAny, findFirst, flatMap, forEach, isSorted, limit, map, peek, pump, remove, skip, sorted, sorted, span, unwrap
-
Methods inherited from interface org.comroid.mutatio.ref.ReferenceIndex
get, requireNonNull, requireNonNull, stream, subset, subset, wrap
-
-
-
-
Field Detail
-
AUTOEMPTY_DISABLED
public static final int AUTOEMPTY_DISABLED
- See Also:
- Constant Field Values
-
refs
protected final ReferenceIndex<O> refs
-
-
Constructor Detail
-
BasicPipe
public BasicPipe(ReferenceIndex<O> old)
-
BasicPipe
public BasicPipe(ReferenceIndex<O> old, int autoEmptyLimit)
-
BasicPipe
public BasicPipe(ReferenceIndex<O> old, StageAdapter<O,T> adapter)
-
BasicPipe
public BasicPipe(ReferenceIndex<O> old, StageAdapter<O,T> adapter, int autoEmptyLimit)
-
-
Method Detail
-
getAdapter
public StageAdapter<O,T> getAdapter()
- Specified by:
getAdapterin interfacePipe<O,T>
-
getChildren
public final java.util.Collection<? extends java.lang.AutoCloseable> getChildren()
- Specified by:
getChildrenin interfaceorg.comroid.api.Disposable
-
addChildren
public final void addChildren(java.lang.AutoCloseable child)
- Specified by:
addChildrenin interfaceorg.comroid.api.Disposable
-
addStage
public <R> Pipe<T,R> addStage(StageAdapter<T,R> stage)
-
size
public int size()
- Specified by:
sizein interfaceReferenceIndex<O>
-
add
public boolean add(T item)
- Specified by:
addin interfaceReferenceIndex<O>
-
clear
public void clear()
Description copied from interface:ReferenceIndexDeletes all elements- Specified by:
clearin interfaceReferenceIndex<O>
-
accept
public void accept(O other)
-
getReference
public Reference<T> getReference(int index)
- Specified by:
getReferencein interfaceReferenceIndex<O>
-
-