| 程序包 | 说明 |
|---|---|
| com.jn.langx.io.resource | |
| com.jn.langx.util.collection |
many collection utility class
|
| com.jn.langx.util.collection.tree |
Tree APIs
|
| com.jn.langx.util.concurrent.completion | |
| com.jn.langx.util.function | |
| com.jn.langx.util.io |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
Resources.readLines(String location,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Resources.readLines(String location,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate) |
static void |
Resources.readUsingDelimiter(Resource resource,
String delimiter,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Resources.readUsingDelimiter(Resource resource,
String delimiter,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate) |
static void |
Resources.readUsingDelimiter(String location,
String delimiter,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Resources.readUsingDelimiter(String location,
String delimiter,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E,R> R |
Collects.collect(Object anyObject,
Supplier0<R> containerFactory,
Consumer2<R,E> consumer) |
static <E,C extends Iterable<E>> |
Collects.forEach(C collection,
Consumer2<Integer,E> consumer)
Iterate every element
|
static <E,C extends Collection<E>> |
Collects.forEach(C collection,
Consumer2<Integer,E> consumer) |
static <E,C extends Iterable<E>> |
Collects.forEach(C collection,
Consumer2<Integer,E> consumer,
Predicate2<Integer,E> breakPredicate)
Iterate every element
|
void |
Pipeline.forEach(Consumer2<Integer,E> consumer) |
void |
Pipeline.forEach(Consumer2<Integer,E> consumer,
Predicate2<Integer,E> breakPredicate) |
static <E,C extends Iterable<E>> |
Collects.forEach(C collection,
Predicate2<Integer,E> consumePredicate,
Consumer2<Integer,E> consumer)
Consume every element what matched the consumePredicate
|
static <E,C extends Iterable<E>> |
Collects.forEach(C collection,
Predicate2<Integer,E> consumePredicate,
Consumer2<Integer,E> consumer,
Predicate2<Integer,E> breakPredicate)
Consume every element what matched the consumePredicate
|
static <E> void |
Collects.forEach(E[] array,
Consumer2<Integer,E> consumer)
Iterate every element
|
static <E> void |
Collects.forEach(E[] array,
Consumer2<Integer,E> consumer,
Predicate2<Integer,E> breakPredicate)
Iterate every element
|
static <E> void |
Collects.forEach(E[] array,
Predicate2<Integer,E> consumePredicate,
Consumer2<Integer,E> consumer)
consume every element that matched the consumePredicate
|
static <E> void |
Collects.forEach(E[] array,
Predicate2<Integer,E> consumePredicate,
Consumer2<Integer,E> consumer,
Predicate2<Integer,E> breakPredicate)
consume every element that matched the consumePredicate
|
static <K,V,M extends Map<? extends K,? extends V>> |
Collects.forEach(M map,
Consumer2<K,V> consumer)
Iterate every element
|
static <K,V,M extends Map<? extends K,? extends V>> |
Collects.forEach(M map,
Consumer2<K,V> consumer,
Predicate2<K,V> breakPredicate)
Iterate every element
|
static <K,V,M extends Map<? extends K,? extends V>> |
Collects.forEach(M map,
Predicate2<K,V> consumePredicate,
Consumer2<K,V> consumer)
consume every element what matched the consumePredicate
|
static <K,V,M extends Map<? extends K,? extends V>> |
Collects.forEach(M map,
Predicate2<K,V> consumePredicate,
Consumer2<K,V> consumer,
Predicate2<K,V> breakPredicate)
consume every element what matched the consumePredicate
|
static <E> void |
Collects.forEach(Object obj,
Consumer2<Integer,E> consumer) |
void |
Pipeline.forEach(Predicate2<Integer,E> consumePredicate,
Consumer2<Integer,E> consumer) |
void |
Pipeline.forEach(Predicate2<Integer,E> consumePredicate,
Consumer2<Integer,E> consumer,
Predicate2<Integer,E> breakPredicate) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Tree.forEach(Consumer2<Tree,TreeNode> paramCallback) |
void |
SimpleTree.forEach(Consumer2<Tree,TreeNode> cb) |
void |
CommonTree.forEach(Consumer2<Tree,TreeNode> cb) |
| 限定符和类型 | 方法和说明 |
|---|---|
<U> CompletionStep<Void> |
CompletionStep.thenAcceptBoth(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action)
Returns a new CompletionStage that, when this and the other
given stage both complete normally, is executed with the two
results as arguments to the supplied action.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBoth(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action) |
<U> CompletionStep<Void> |
CompletionStep.thenAcceptBothAsync(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action)
Returns a new CompletionStage that, when this and the other
given stage both complete normally, is executed using this
stage's default asynchronous execution facility, with the two
results as arguments to the supplied action.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action) |
<U> CompletionStep<Void> |
CompletionStep.thenAcceptBothAsync(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action,
Executor executor)
Returns a new CompletionStage that, when this and the other
given stage both complete normally, is executed using the
supplied executor, with the two results as arguments to the
supplied action.
|
<U> CompletableFuture<Void> |
CompletableFuture.thenAcceptBothAsync(CompletionStep<? extends U> other,
Consumer2<? super T,? super U> action,
Executor executor) |
CompletionStep<T> |
CompletionStep.whenComplete(Consumer2<? super T,? super Throwable> action)
Returns a new CompletionStage with the same result or exception as
this stage, that executes the given action when this stage completes.
|
CompletableFuture<T> |
CompletableFuture.whenComplete(Consumer2<? super T,? super Throwable> action) |
CompletionStep<T> |
CompletionStep.whenCompleteAsync(Consumer2<? super T,? super Throwable> action)
Returns a new CompletionStage with the same result or exception as
this stage, that executes the given action using this stage's
default asynchronous execution facility when this stage completes.
|
CompletableFuture<T> |
CompletableFuture.whenCompleteAsync(Consumer2<? super T,? super Throwable> action) |
CompletionStep<T> |
CompletionStep.whenCompleteAsync(Consumer2<? super T,? super Throwable> action,
Executor executor)
Returns a new CompletionStage with the same result or exception as
this stage, that executes the given action using the supplied
Executor when this stage completes.
|
CompletableFuture<T> |
CompletableFuture.whenCompleteAsync(Consumer2<? super T,? super Throwable> action,
Executor executor) |
| 限定符和类型 | 方法和说明 |
|---|---|
Consumer2<C,E> |
Collector.accumulator() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
Channels.readLines(InputStream inputStream,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Channels.readLines(InputStream inputStream,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate) |
static void |
Channels.readLines(InputStream inputStream,
Consumer2<Integer,String> consumer) |
static void |
Channels.readLines(InputStream inputStream,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate) |
static void |
Channels.readLines(ReadableByteChannel channel,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Channels.readLines(ReadableByteChannel channel,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate) |
static void |
Channels.readUsingDelimiter(InputStream inputStream,
String delimiter,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Channels.readUsingDelimiter(InputStream inputStream,
String delimiter,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakConsumer) |
static void |
Channels.readUsingDelimiter(InputStream inputStream,
String delimiter,
Consumer2<Integer,byte[]> consumer) |
static void |
Channels.readUsingDelimiter(InputStream inputStream,
String delimiter,
Predicate2<Integer,byte[]> consumePredicate,
Consumer2<Integer,byte[]> consumer,
Predicate2<Integer,byte[]> breakPredicate) |
static void |
Channels.readUsingDelimiter(ReadableByteChannel channel,
String delimiter,
Charset charset,
Consumer2<Integer,String> consumer) |
static void |
Channels.readUsingDelimiter(ReadableByteChannel channel,
String delimiter,
Charset charset,
Predicate2<Integer,String> consumePredicate,
Consumer2<Integer,String> consumer,
Predicate2<Integer,String> breakPredicate)
在消费之前,把 byte[] 转为 String
|
static void |
Channels.readUsingDelimiter(ReadableByteChannel channel,
String delimiter,
Consumer2<Integer,byte[]> consumer) |
static void |
Channels.readUsingDelimiter(ReadableByteChannel channel,
String delimiter,
Predicate2<Integer,byte[]> consumePredicate,
Consumer2<Integer,byte[]> consumer,
Predicate2<Integer,byte[]> breakPredicate)
所有方法最终都是走这个
|
Copyright © 2020. All rights reserved.