| 程序包 | 说明 |
|---|---|
| com.jn.langx.text | |
| com.jn.langx.text.stringtemplate | |
| com.jn.langx.util |
This package contain all most utility classes for java coding
|
| com.jn.langx.util.collection |
many collection utility class
|
| com.jn.langx.util.collection.multivalue | |
| com.jn.langx.util.concurrent.completion | |
| com.jn.langx.util.function |
| 限定符和类型 | 方法和说明 |
|---|---|
StringTemplates.TemplateFluenter |
StringTemplates.TemplateFluenter.format(Pattern variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args) |
StringTemplates.TemplateFluenter |
StringTemplates.TemplateFluenter.format(String variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args) |
static String |
StringTemplates.format(String template,
Pattern variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args)
custom formatter
|
static String |
StringTemplates.format(String template,
String variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args)
custom formatter
|
static String |
StringTemplates.format(String template,
String variableStartFlag,
String variableEndFlag,
Function2<String,Object[],String> valueGetter,
Object... args)
模板变量替换
|
| 限定符和类型 | 类和说明 |
|---|---|
static class |
StringTemplate.IndexBasedValueGetter |
| 限定符和类型 | 方法和说明 |
|---|---|
Function2<String,Object[],String> |
CustomPatternStringFormatter.getValueGetter() |
| 限定符和类型 | 方法和说明 |
|---|---|
StringTemplateFormatterChain |
StringTemplateFormatterChain.addFormatterAndParameters(Pattern pattern,
Function2<String,Object[],String> valueGetter,
Object... args) |
StringTemplateFormatterChain |
StringTemplateFormatterChain.addFormatterAndParameters(String variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args) |
void |
PlaceholderStringFormatter.setValueGetter(Function2<String,Object[],String> valueGetter) |
void |
IndexStringFormatter.setValueGetter(Function2<String,Object[],String> valueGetter) |
void |
CustomPatternStringFormatter.setValueGetter(Function2<String,Object[],String> valueGetter) |
StringTemplate |
StringTemplate.with(Function2<String,Object[],String> valueGetter)
set a value getter
|
| 构造器和说明 |
|---|
CustomPatternStringFormatter(Pattern pattern,
Function2<String,Object[],String> valueGetter) |
CustomPatternStringFormatter(String pattern,
Function2<String,Object[],String> valueGetter) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
ThrowableFunction2<I1,I2,O>
这是对 Function2
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <X extends RuntimeException> |
Preconditions.outOfBoundsExceptionFormatter(Function<String,X> f)
Returns an out-of-bounds exception formatter from an given exception
factory.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <X extends RuntimeException> |
Preconditions.checkFromIndexSize(int fromIndex,
int size,
int length,
Function2<String,List<Integer>,X> oobef)
Checks if the sub-range from
fromIndex (inclusive) to
fromIndex + size (exclusive) is within the bounds of range from
0 (inclusive) to length (exclusive). |
static <X extends RuntimeException> |
Preconditions.checkFromToIndex(int fromIndex,
int toIndex,
int length,
Function2<String,List<Integer>,X> oobef)
Checks if the sub-range from
fromIndex (inclusive) to
toIndex (exclusive) is within the bounds of range from 0
(inclusive) to length (exclusive). |
static <X extends RuntimeException> |
Preconditions.checkIndex(int index,
int length,
Function2<String,List<Integer>,X> oobef)
Checks if the
index is within the bounds of the range from
0 (inclusive) to length (exclusive). |
| 限定符和类型 | 方法和说明 |
|---|---|
static <E,C extends Iterable<E>,O> |
Collects.firstMap(C collection,
Function2<Integer,E,O> mapper)
find the first matched element, null if not found
|
static <E,C extends Iterable<E>,O> |
Collects.firstMap(C collection,
Function2<Integer,E,O> mapper,
Predicate<O> breakPredicate)
find the first matched element, null if not found
|
<O> O |
Pipeline.firstMap(Function2<Integer,E,O> mapper) |
<O> O |
Pipeline.firstMap(Function2<Integer,E,O> mapper,
Predicate<O> breakPredicate) |
static <K,V,O> O |
Collects.firstMap(Map<K,V> map,
Function2<K,V,O> mapper)
find the first matched element, null if not found
|
static <K,V,O> O |
Collects.firstMap(Map<K,V> map,
Function2<K,V,O> mapper,
Predicate<O> breakPredicate)
find the first matched element, null if not found
|
static <E,K> Collector<E,Map<K,List<E>>> |
Collects.groupingBy(Function2<Integer,E,K> classifier,
Supplier0<Map<K,List<E>>> mapFactory) |
static <K,V,R,M extends Map<K,V>> |
Collects.map(M map,
Function2<K,V,R> mapper)
mapping aMap to a list
|
static <E,K> List<List<E>> |
Collects.partitionBy(E[] c,
Function2<Integer,E,K> classifier) |
<K> Pipeline<List<E>> |
Pipeline.partitionBy(Function2<Integer,E,K> classifier) |
static <E,K> List<List<E>> |
Collects.partitionBy(Iterable<E> c,
Function2<Integer,E,K> classifier) |
static <E,K> List<List<E>> |
Collects.partitionBy(Iterator<E> c,
Function2<Integer,E,K> classifier) |
static <E,K> Collector<E,Map<K,List<E>>> |
Collects.partitioningBy(Function2<Integer,E,K> classifier) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <K1,V1,K2,V2> |
MultiValueMaps.toMultiValueMap(Map<K1,V1> map,
Function2<K1,V1,K2> keyMapper,
Function2<K1,V1,V2> valueMapper) |
static <K1,V1,K2,V2> |
MultiValueMaps.toMultiValueMap(Map<K1,V1> map,
Function2<K1,V1,K2> keyMapper,
Function2<K1,V1,V2> valueMapper) |
static <K1,V1,C extends Iterable<V1>,K2,V2> |
MultiValueMaps.toMultiValueMap2(Map<K1,C> map,
Function2<K1,V1,K2> keyMapper,
Function2<K1,V1,V2> valueMapper)
将 数组 Iterable
|
static <K1,V1,C extends Iterable<V1>,K2,V2> |
MultiValueMaps.toMultiValueMap2(Map<K1,C> map,
Function2<K1,V1,K2> keyMapper,
Function2<K1,V1,V2> valueMapper)
将 数组 Iterable
|
static <K1,V1,K2,V2> |
MultiValueMaps.toMultiValueMap3(Map<K1,V1[]> map,
Function2<K1,V1,K2> keyMapper,
Function2<K1,V1,V2> valueMapper)
将 数组 V[]中的每一个元素取出来,放到一个 MultiValueMap 中。
|
static <K1,V1,K2,V2> |
MultiValueMaps.toMultiValueMap3(Map<K1,V1[]> map,
Function2<K1,V1,K2> keyMapper,
Function2<K1,V1,V2> valueMapper)
将 数组 V[]中的每一个元素取出来,放到一个 MultiValueMap 中。
|
| 限定符和类型 | 方法和说明 |
|---|---|
<U> CompletionStep<U> |
CompletionStep.handle(Function2<? super T,Throwable,? extends U> fn)
Returns a new CompletionStage that, when this stage completes
either normally or exceptionally, is executed with this stage's
result and exception as arguments to the supplied function.
|
<U> CompletableFuture<U> |
CompletableFuture.handle(Function2<? super T,Throwable,? extends U> fn) |
<U> CompletionStep<U> |
CompletionStep.handleAsync(Function2<? super T,Throwable,? extends U> fn)
Returns a new CompletionStage that, when this stage completes
either normally or exceptionally, is executed using this stage's
default asynchronous execution facility, with this stage's
result and exception as arguments to the supplied function.
|
<U> CompletableFuture<U> |
CompletableFuture.handleAsync(Function2<? super T,Throwable,? extends U> fn) |
<U> CompletionStep<U> |
CompletionStep.handleAsync(Function2<? super T,Throwable,? extends U> fn,
Executor executor)
Returns a new CompletionStage that, when this stage completes
either normally or exceptionally, is executed using the
supplied executor, with this stage's result and exception as
arguments to the supplied function.
|
<U> CompletableFuture<U> |
CompletableFuture.handleAsync(Function2<? super T,Throwable,? extends U> fn,
Executor executor) |
<U,V> CompletionStep<V> |
CompletionStep.thenCombine(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn)
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 function.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombine(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn) |
<U,V> CompletionStep<V> |
CompletionStep.thenCombineAsync(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn)
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 function.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn) |
<U,V> CompletionStep<V> |
CompletionStep.thenCombineAsync(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn,
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 function.
|
<U,V> CompletableFuture<V> |
CompletableFuture.thenCombineAsync(CompletionStep<? extends U> other,
Function2<? super T,? super U,? extends V> fn,
Executor executor) |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
Mapper2<I1,I2,O> |
interface |
Operator2<V> |
| 限定符和类型 | 方法和说明 |
|---|---|
static Function2<Double,Double,Double> |
Functions.maxDoubleFunction() |
static Function2<Float,Float,Float> |
Functions.maxFloatFunction() |
static Function2<Integer,Integer,Integer> |
Functions.maxIntegerFunction() |
static Function2<Long,Long,Long> |
Functions.maxLongFunction() |
static Function2<Double,Double,Double> |
Functions.minDoubleFunction() |
static Function2<Float,Float,Float> |
Functions.minFloatFunction() |
static Function2<Integer,Integer,Integer> |
Functions.minIntegerFunction() |
static Function2<Long,Long,Long> |
Functions.minLongFunction() |
static Function2<Double,Double,Double> |
Functions.sumDoubleFunction() |
static Function2<Float,Float,Float> |
Functions.sumFloatFunction() |
static Function2<Integer,Integer,Integer> |
Functions.sumIntegerFunction() |
static Function2<Long,Long,Long> |
Functions.sumLongFunction() |
Copyright © 2021. All rights reserved.