Package | Description |
---|---|
com.annimon.stream |
Modifier and Type | Field and Description |
---|---|
static Supplier<java.util.LinkedHashMap<java.lang.String,java.lang.Object>> |
Fn.SUPPLIER_OF_LINKED_HASH_MAP |
static Supplier<java.util.Map<java.lang.String,java.lang.Object>> |
Fn.SUPPLIER_OF_MAP |
Modifier and Type | Method and Description |
---|---|
static <T> Supplier<java.util.ArrayDeque<T>> |
Fn.Suppliers.ofArrayDeque() |
static <K,V> Supplier<java.util.concurrent.ConcurrentHashMap<K,V>> |
Fn.Suppliers.ofConcurrentHashMap() |
static <T> Supplier<java.util.concurrent.ConcurrentLinkedQueue<T>> |
Fn.Suppliers.ofConcurrentLinkedQueue() |
static <T> Supplier<java.util.concurrent.LinkedBlockingQueue<T>> |
Fn.Suppliers.ofLinkedBlockingQueue() |
static <K,V> Supplier<java.util.LinkedHashMap<K,V>> |
Fn.Suppliers.ofLinkedHashMap() |
static <T> Supplier<java.util.LinkedHashSet<T>> |
Fn.Suppliers.ofLinkedHashSet() |
static <T> Supplier<java.util.LinkedList<T>> |
Fn.Suppliers.ofLinkedList() |
static <T> Supplier<java.util.List<T>> |
Fn.Suppliers.ofList() |
static <K,V> Supplier<java.util.Map<K,V>> |
Fn.Suppliers.ofMap() |
static <T> Supplier<java.util.PriorityQueue<T>> |
Fn.Suppliers.ofPriorityQueue() |
static <T> Supplier<java.util.Queue<T>> |
Fn.Suppliers.ofQueue() |
static <T> Supplier<java.util.Set<T>> |
Fn.Suppliers.ofSet() |
static <K,V> Supplier<java.util.TreeMap<K,V>> |
Fn.Suppliers.ofTreeMap() |
static <T> Supplier<java.util.TreeSet<T>> |
Fn.Suppliers.ofTreeSet() |
Supplier<A> |
Collector.supplier()
Function provides new containers.
|
Modifier and Type | Method and Description |
---|---|
<R> R |
EntryStream.collect(Supplier<R> supplier,
BiConsumer<R,? super java.util.Map.Entry<K,V>> accumulator) |
<R> R |
Stream.collect(Supplier<R> supplier,
BiConsumer<R,? super T> accumulator)
Collects elements to
supplier provided container by applying the given accumulation function. |
<R> R |
DoubleStream.collect(Supplier<R> supplier,
ObjDoubleConsumer<R> accumulator)
Collects elements to
supplier provided container by applying the given accumulation function. |
<R> R |
IntStream.collect(Supplier<R> supplier,
ObjIntConsumer<R> accumulator)
Collects elements to
supplier provided container by applying the given accumulation function. |
<R> R |
LongStream.collect(Supplier<R> supplier,
ObjLongConsumer<R> accumulator)
Collects elements to
supplier provided container by applying the given accumulation function. |
static <T> Stream<T> |
Stream.generate(Supplier<T> supplier)
Creates a
Stream by elements that generated by Supplier . |
static <T> T |
Fn.get(Supplier<T> supplier) |
<A,D> EntryStream<K,D> |
EntryStream.groupBy(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream,
Supplier<java.util.Map<K,D>> mapFactory) |
<K,A,D> Stream<java.util.Map.Entry<K,D>> |
Stream.groupBy(Function<? super T,? extends K> classifier,
Collector<? super T,A,D> downstream,
Supplier<java.util.Map<K,D>> mapFactory) |
<K,A,D> EntryStream<K,D> |
Stream.groupByToEntry(Function<? super T,? extends K> classifier,
Collector<? super T,A,D> downstream,
Supplier<java.util.Map<K,D>> mapFactory) |
static <T,K,D,A,M extends java.util.Map<K,D>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier,
Collector<? super T,A,D> downstream,
Supplier<M> mapFactory)
Returns a
Collector that performs grouping operation by given classifier. |
<D,A,M extends java.util.Map<K,D>> |
EntryStream.groupTo(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream,
Supplier<M> mapFactory) |
<K,D,A,M extends java.util.Map<K,D>> |
Stream.groupTo(Function<? super T,? extends K> classifier,
Collector<? super T,A,D> downstream,
Supplier<M> mapFactory) |
T |
Optional.orGet(Supplier<? extends T> other)
Returns inner value if present, otherwise returns value produced by supplier function.
|
<X extends java.lang.Throwable> |
Optional.orThrow(Supplier<? extends X> exc)
Returns inner value if present, otherwise throws the exception provided by supplier function.
|
<X extends java.lang.Throwable> |
OptionalLong.orThrow(Supplier<X> exceptionSupplier)
Returns the value if present, otherwise throws an exception provided by supplier function.
|
<X extends java.lang.Throwable> |
OptionalInt.orThrow(Supplier<X> exceptionSupplier)
Returns the value if present, otherwise throws an exception provided by supplier function.
|
<X extends java.lang.Throwable> |
OptionalDouble.orThrow(Supplier<X> exceptionSupplier)
Returns the value if present, otherwise throws an exception provided by supplier function.
|
<X extends java.lang.Throwable> |
OptionalBoolean.orThrow(Supplier<X> exceptionSupplier)
Returns the value if present, otherwise throws an exception provided by supplier function.
|
<C extends java.util.Collection<T>> |
Stream.toCollection(Supplier<C> supplier) |
static <T,R extends java.util.Collection<T>> |
Collectors.toCollection(Supplier<R> collectionSupplier)
Returns a
Collector that fills new Collection , provided by collectionSupplier ,
with input elements. |
<M extends java.util.Map<K,V>> |
EntryStream.toMap(BinaryOperator<V> mergeFunction,
Supplier<M> mapFactory) |
<K,V,M extends java.util.Map<K,V>> |
Stream.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction,
Supplier<M> mapFactory) |
static <T,K,V,M extends java.util.Map<K,V>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction,
Supplier<M> mapFactory)
Returns a
Collector that fills new Map with input elements. |
<K,V,M extends java.util.Map<K,V>> |
Stream.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<M> mapFactory) |
static <T,K,V,M extends java.util.Map<K,V>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<M> mapFactory) |
<M extends java.util.Map<K,V>> |
EntryStream.toMap(Supplier<M> mapFactory) |