Package net.anwiba.commons.lang.stream
Class FailedStream<T,E extends java.lang.Exception>
- java.lang.Object
-
- net.anwiba.commons.lang.stream.FailedStream<T,E>
-
- All Implemented Interfaces:
java.lang.AutoCloseable,ICloseable<E>,IStream<T,E>
public class FailedStream<T,E extends java.lang.Exception> extends java.lang.Object implements IStream<T,E>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <O> IOptional<O,E>aggregate(O inital, IAggregator<O,T,O,E> aggregator)<O> O[]asArray(java.util.function.IntFunction<O[]> function)<O> java.util.Collection<O>asCollection()<O> java.util.List<O>asList()<K,V>
java.util.Map<K,V>asMap(IFactory<T,K,E> keyFactrory, IFactory<T,V,E> valueFactrory)<O> IObjectList<O>asObjectList()<O> java.util.Set<O>asSet()<O> java.util.stream.Stream<O>asStream()<O> IStream<O,E>convert(IAggregator<java.lang.Integer,T,O,E> aggregator)<O> IStream<O,E>convert(IConverter<T,O,E> funtion)IStream<T,E>distinct()IStream<T,E>execute()IStream<T,E>failed(ISupplier<java.lang.Iterable<T>,E> supplier)IStream<T,E>filter(IAcceptor<T> funtion)IOptional<T,E>first()IOptional<T,E>first(IAcceptor<T> acceptor)<O> IStream<O,E>flat(IConverter<T,java.lang.Iterable<O>,E> funtion)IStream<T,E>foreach(int initial, IIntAssimilator<T,E> assimilator)IStream<T,E>foreach(IAssimilator<java.lang.Integer,T,E> assimilator)IStream<T,E>foreach(IConsumer<T,E> consumer)booleanfoundAny()booleanfoundAny(IAcceptor<T> acceptor)<O> IStream<O,E>instanceOf(java.lang.Class<O> clazz)booleanisEmpty()booleanisSuccessful()IStream<T,E>notNull()IStream<T,E>revert()voidthrowIfFailed()java.lang.Iterable<T>toIterable()java.util.stream.Stream<T>toStream()
-
-
-
Method Detail
-
convert
public <O> IStream<O,E> convert(IConverter<T,O,E> funtion)
-
flat
public <O> IStream<O,E> flat(IConverter<T,java.lang.Iterable<O>,E> funtion)
-
convert
public <O> IStream<O,E> convert(IAggregator<java.lang.Integer,T,O,E> aggregator)
-
instanceOf
public <O> IStream<O,E> instanceOf(java.lang.Class<O> clazz)
- Specified by:
instanceOfin interfaceIStream<T,E extends java.lang.Exception>
-
asArray
public <O> O[] asArray(java.util.function.IntFunction<O[]> function) throws E extends java.lang.Exception
-
toIterable
public java.lang.Iterable<T> toIterable() throws E extends java.lang.Exception
- Specified by:
toIterablein interfaceIStream<T,E extends java.lang.Exception>- Throws:
E extends java.lang.Exception
-
asCollection
public <O> java.util.Collection<O> asCollection() throws E extends java.lang.Exception- Specified by:
asCollectionin interfaceIStream<T,E extends java.lang.Exception>- Throws:
E extends java.lang.Exception
-
asList
public <O> java.util.List<O> asList() throws E extends java.lang.Exception
-
asSet
public <O> java.util.Set<O> asSet() throws E extends java.lang.Exception
-
asMap
public <K,V> java.util.Map<K,V> asMap(IFactory<T,K,E> keyFactrory, IFactory<T,V,E> valueFactrory) throws E extends java.lang.Exception
-
asObjectList
public <O> IObjectList<O> asObjectList() throws E extends java.lang.Exception
- Specified by:
asObjectListin interfaceIStream<T,E extends java.lang.Exception>- Throws:
E extends java.lang.Exception
-
aggregate
public <O> IOptional<O,E> aggregate(O inital, IAggregator<O,T,O,E> aggregator)
-
foundAny
public boolean foundAny() throws E extends java.lang.Exception
-
throwIfFailed
public void throwIfFailed() throws E extends java.lang.Exception- Specified by:
throwIfFailedin interfaceIStream<T,E extends java.lang.Exception>- Throws:
E extends java.lang.Exception
-
isEmpty
public boolean isEmpty() throws E extends java.lang.Exception
-
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessfulin interfaceIStream<T,E extends java.lang.Exception>
-
asStream
public <O> java.util.stream.Stream<O> asStream() throws E extends java.lang.Exception
-
-