public final class Functions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Functions.BooleanFunctionChain<T1,T2> |
static class |
Functions.ByteFunctionChain<T1,T2> |
static class |
Functions.CharFunctionChain<T1,T2> |
static class |
Functions.DoubleFunctionChain<T1,T2> |
static class |
Functions.FloatFunctionChain<T1,T2> |
static class |
Functions.FunctionChain<T1,T2,T3> |
static class |
Functions.IntFunctionChain<T1,T2> |
static class |
Functions.LongFunctionChain<T1,T2> |
static class |
Functions.ShortFunctionChain<T1,T2> |
static class |
Functions.SizeFunction |
| Modifier and Type | Method and Description |
|---|---|
static <T,P,R> org.eclipse.collections.api.block.function.Function<T,R> |
bind(org.eclipse.collections.api.block.function.Function2<? super T,? super P,? extends R> function,
P parameter)
Bind the parameter passed to a Function2 into a new Function.
|
static <T1,T2> org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<T1> |
bind(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T2> delegate,
org.eclipse.collections.api.block.function.Function<? super T1,T2> function)
Bind the input of a ObjectIntProcedure to the result of an function, returning a new ObjectIntProcedure.
|
static <T1,T2> org.eclipse.collections.api.block.procedure.Procedure<T1> |
bind(org.eclipse.collections.api.block.procedure.Procedure<? super T2> delegate,
org.eclipse.collections.api.block.function.Function<? super T1,T2> function)
Bind the input of a Procedure to the result of an function, returning a new Procedure.
|
static <T1,T2,T3> org.eclipse.collections.api.block.procedure.Procedure2<T1,T3> |
bind(org.eclipse.collections.api.block.procedure.Procedure2<? super T2,T3> delegate,
org.eclipse.collections.api.block.function.Function<? super T1,T2> function)
Bind the input of the first argument of a Procedure2 to the result of an function, returning a new Procedure2.
|
static <T extends Comparable<? super T>,V> |
caseDefault(org.eclipse.collections.api.block.function.Function<? super T,? extends V> defaultFunction) |
static <T extends Comparable<? super T>,V> |
caseDefault(org.eclipse.collections.api.block.function.Function<? super T,? extends V> defaultFunction,
org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
cast(org.eclipse.collections.api.block.function.Function<T,V> function)
Allows a Java 8 lambda and method reference to be used in a method taking a Function as a parameter
without any ambiguity.
|
static <T1,T2,T3> Functions.FunctionChain<T1,T2,T3> |
chain(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.Function<? super T2,T3> function2) |
static <T1,T2> Functions.BooleanFunctionChain<T1,T2> |
chainBoolean(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.BooleanFunction<? super T2> function2) |
static <T1,T2> Functions.ByteFunctionChain<T1,T2> |
chainByte(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.ByteFunction<? super T2> function2) |
static <T1,T2> Functions.CharFunctionChain<T1,T2> |
chainChar(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.CharFunction<? super T2> function2) |
static <T1,T2> Functions.DoubleFunctionChain<T1,T2> |
chainDouble(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.DoubleFunction<? super T2> function2) |
static <T1,T2> Functions.FloatFunctionChain<T1,T2> |
chainFloat(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.FloatFunction<? super T2> function2) |
static <T1,T2> Functions.IntFunctionChain<T1,T2> |
chainInt(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.IntFunction<? super T2> function2) |
static <T1,T2> Functions.LongFunctionChain<T1,T2> |
chainLong(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.LongFunction<? super T2> function2) |
static <T1,T2> Functions.ShortFunctionChain<T1,T2> |
chainShort(org.eclipse.collections.api.block.function.Function<T1,T2> function1,
org.eclipse.collections.api.block.function.primitive.ShortFunction<? super T2> function2) |
static org.eclipse.collections.api.block.function.Function<String,Class<?>> |
classForName() |
static <T1,T2,I extends Iterable<T2>> |
firstNotEmptyCollectionValue(org.eclipse.collections.api.block.function.Function<T1,I>... functions) |
static <T> org.eclipse.collections.api.block.function.Function<T,String> |
firstNotEmptyStringValue(org.eclipse.collections.api.block.function.Function<T,String>... functions) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
firstNotNullValue(org.eclipse.collections.api.block.function.Function<T,V>... functions) |
static <V1> org.eclipse.collections.api.block.function.Function<org.eclipse.collections.api.tuple.Pair<V1,?>,V1> |
firstOfPair() |
static org.eclipse.collections.api.block.function.Function<Double,Double> |
getDoublePassThru() |
static org.eclipse.collections.api.block.function.Function<Object,Boolean> |
getFalse() |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
getFixedValue(V value) |
static org.eclipse.collections.api.block.function.Function<Integer,Integer> |
getIntegerPassThru() |
static <K> org.eclipse.collections.api.block.function.Function<Map.Entry<K,?>,K> |
getKeyFunction() |
static org.eclipse.collections.api.block.function.Function<Long,Long> |
getLongPassThru() |
static org.eclipse.collections.api.block.function.Function<Number,Double> |
getMathSinFunction() |
static org.eclipse.collections.api.block.function.Function<Object,String> |
getNullSafeToString(String defaultValue) |
static org.eclipse.collections.api.block.function.Function<Number,Number> |
getNumberPassThru() |
static <T> org.eclipse.collections.api.block.function.Function<T,T> |
getPassThru()
Alias for identity().
|
static org.eclipse.collections.api.block.function.Function<Iterable<?>,Integer> |
getSizeOf() |
static org.eclipse.collections.api.block.function.Function<String,String> |
getStringPassThru() |
static org.eclipse.collections.api.block.function.Function<String,Integer> |
getStringToInteger() |
static org.eclipse.collections.api.block.function.Function<String,String> |
getStringTrim() |
static org.eclipse.collections.api.block.function.Function<Object,Class<?>> |
getToClass() |
static org.eclipse.collections.api.block.function.Function<Object,String> |
getToString() |
static org.eclipse.collections.api.block.function.Function<Object,Boolean> |
getTrue() |
static <V> org.eclipse.collections.api.block.function.Function<Map.Entry<?,V>,V> |
getValueFunction() |
static <T> org.eclipse.collections.api.block.function.Function<T,T> |
identity() |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
ifElse(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> trueFunction,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> falseFunction) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
ifTrue(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
nullSafe(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
nullSafe(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function,
V nullValue) |
static <T,V1,V2> org.eclipse.collections.api.block.function.Function<T,org.eclipse.collections.api.tuple.Pair<V1,V2>> |
pair(org.eclipse.collections.api.block.function.Function<? super T,V1> function1,
org.eclipse.collections.api.block.function.Function<? super T,V2> function2) |
static <V2> org.eclipse.collections.api.block.function.Function<org.eclipse.collections.api.tuple.Pair<?,V2>,V2> |
secondOfPair() |
static org.eclipse.collections.api.block.function.Function<Integer,Integer> |
squaredInteger() |
static <S,T> org.eclipse.collections.api.block.function.Function<org.eclipse.collections.api.tuple.Pair<S,T>,org.eclipse.collections.api.tuple.Pair<T,S>> |
swappedPair()
Swap the input pair and return the swapped pair.
|
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
synchronizedEach(org.eclipse.collections.api.block.function.Function<T,V> function) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
throwing(ThrowingFunction<T,V> throwingFunction) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toBooleanComparator(org.eclipse.collections.api.block.function.primitive.BooleanFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toByteComparator(org.eclipse.collections.api.block.function.primitive.ByteFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toCharComparator(org.eclipse.collections.api.block.function.primitive.CharFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toDoubleComparator(org.eclipse.collections.api.block.function.primitive.DoubleFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toFloatComparator(org.eclipse.collections.api.block.function.primitive.FloatFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toIntComparator(org.eclipse.collections.api.block.function.primitive.IntFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toLongComparator(org.eclipse.collections.api.block.function.primitive.LongFunction<T> function) |
static <T> org.eclipse.collections.api.block.SerializableComparator<T> |
toShortComparator(org.eclipse.collections.api.block.function.primitive.ShortFunction<T> function) |
static <T,V> org.eclipse.collections.api.block.function.Function<T,V> |
withDefault(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function,
V defaultValue) |
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> throwing(ThrowingFunction<T,V> throwingFunction)
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> cast(org.eclipse.collections.api.block.function.Function<T,V> function)
public static <T> org.eclipse.collections.api.block.function.Function<T,T> getPassThru()
identity()public static <T> org.eclipse.collections.api.block.function.Function<T,T> identity()
public static org.eclipse.collections.api.block.function.Function<Object,Boolean> getTrue()
public static org.eclipse.collections.api.block.function.Function<Object,Boolean> getFalse()
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> getFixedValue(V value)
public static org.eclipse.collections.api.block.function.Function<Object,Class<?>> getToClass()
public static org.eclipse.collections.api.block.function.Function<Number,Double> getMathSinFunction()
public static org.eclipse.collections.api.block.function.Function<Number,Number> getNumberPassThru()
public static org.eclipse.collections.api.block.function.Function<Integer,Integer> getIntegerPassThru()
public static org.eclipse.collections.api.block.function.Function<Long,Long> getLongPassThru()
public static org.eclipse.collections.api.block.function.Function<Double,Double> getDoublePassThru()
public static org.eclipse.collections.api.block.function.Function<String,String> getStringPassThru()
public static org.eclipse.collections.api.block.function.Function<String,String> getStringTrim()
public static org.eclipse.collections.api.block.function.Function<Object,String> getToString()
public static org.eclipse.collections.api.block.function.Function<Object,String> getNullSafeToString(String defaultValue)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toBooleanComparator(org.eclipse.collections.api.block.function.primitive.BooleanFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toByteComparator(org.eclipse.collections.api.block.function.primitive.ByteFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toCharComparator(org.eclipse.collections.api.block.function.primitive.CharFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toFloatComparator(org.eclipse.collections.api.block.function.primitive.FloatFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toShortComparator(org.eclipse.collections.api.block.function.primitive.ShortFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toIntComparator(org.eclipse.collections.api.block.function.primitive.IntFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toDoubleComparator(org.eclipse.collections.api.block.function.primitive.DoubleFunction<T> function)
public static <T> org.eclipse.collections.api.block.SerializableComparator<T> toLongComparator(org.eclipse.collections.api.block.function.primitive.LongFunction<T> function)
public static org.eclipse.collections.api.block.function.Function<String,Integer> getStringToInteger()
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> withDefault(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function,
V defaultValue)
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> nullSafe(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> nullSafe(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function,
V nullValue)
public static <V1> org.eclipse.collections.api.block.function.Function<org.eclipse.collections.api.tuple.Pair<V1,?>,V1> firstOfPair()
public static <V2> org.eclipse.collections.api.block.function.Function<org.eclipse.collections.api.tuple.Pair<?,V2>,V2> secondOfPair()
public static <S,T> org.eclipse.collections.api.block.function.Function<org.eclipse.collections.api.tuple.Pair<S,T>,org.eclipse.collections.api.tuple.Pair<T,S>> swappedPair()
Iterablepublic static <T,P,R> org.eclipse.collections.api.block.function.Function<T,R> bind(org.eclipse.collections.api.block.function.Function2<? super T,? super P,? extends R> function,
P parameter)
function - The Function2 to delegate the invocation to.parameter - The parameter the use in the invocation of the delegate function.public static <T1,T2> org.eclipse.collections.api.block.procedure.Procedure<T1> bind(org.eclipse.collections.api.block.procedure.Procedure<? super T2> delegate,
org.eclipse.collections.api.block.function.Function<? super T1,T2> function)
delegate - The Procedure to delegate the invocation to.function - The Function that will create the input for the delegatepublic static <T1,T2> org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<T1> bind(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T2> delegate,
org.eclipse.collections.api.block.function.Function<? super T1,T2> function)
delegate - The ObjectIntProcedure to delegate the invocation to.function - The Function that will create the input for the delegatepublic static <T1,T2,T3> org.eclipse.collections.api.block.procedure.Procedure2<T1,T3> bind(org.eclipse.collections.api.block.procedure.Procedure2<? super T2,T3> delegate,
org.eclipse.collections.api.block.function.Function<? super T1,T2> function)
delegate - The Procedure2 to delegate the invocation to.function - The Function that will create the input for the delegatepublic static org.eclipse.collections.api.block.function.Function<Integer,Integer> squaredInteger()
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> firstNotNullValue(org.eclipse.collections.api.block.function.Function<T,V>... functions)
public static <T> org.eclipse.collections.api.block.function.Function<T,String> firstNotEmptyStringValue(org.eclipse.collections.api.block.function.Function<T,String>... functions)
public static <T1,T2,I extends Iterable<T2>> org.eclipse.collections.api.block.function.Function<T1,I> firstNotEmptyCollectionValue(org.eclipse.collections.api.block.function.Function<T1,I>... functions)
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> ifTrue(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> ifElse(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> trueFunction,
org.eclipse.collections.api.block.function.Function<? super T,? extends V> falseFunction)
public static <T extends Comparable<? super T>,V> CaseFunction<T,V> caseDefault(org.eclipse.collections.api.block.function.Function<? super T,? extends V> defaultFunction)
public static <T extends Comparable<? super T>,V> CaseFunction<T,V> caseDefault(org.eclipse.collections.api.block.function.Function<? super T,? extends V> defaultFunction, org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate, org.eclipse.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V> org.eclipse.collections.api.block.function.Function<T,V> synchronizedEach(org.eclipse.collections.api.block.function.Function<T,V> function)
public static org.eclipse.collections.api.block.function.Function<String,Class<?>> classForName()
public static <T1,T2,T3> Functions.FunctionChain<T1,T2,T3> chain(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.Function<? super T2,T3> function2)
public static <T1,T2> Functions.BooleanFunctionChain<T1,T2> chainBoolean(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.BooleanFunction<? super T2> function2)
public static <T1,T2> Functions.ByteFunctionChain<T1,T2> chainByte(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.ByteFunction<? super T2> function2)
public static <T1,T2> Functions.CharFunctionChain<T1,T2> chainChar(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.CharFunction<? super T2> function2)
public static <T1,T2> Functions.DoubleFunctionChain<T1,T2> chainDouble(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.DoubleFunction<? super T2> function2)
public static <T1,T2> Functions.FloatFunctionChain<T1,T2> chainFloat(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.FloatFunction<? super T2> function2)
public static <T1,T2> Functions.IntFunctionChain<T1,T2> chainInt(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.IntFunction<? super T2> function2)
public static <T1,T2> Functions.LongFunctionChain<T1,T2> chainLong(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.LongFunction<? super T2> function2)
public static <T1,T2> Functions.ShortFunctionChain<T1,T2> chainShort(org.eclipse.collections.api.block.function.Function<T1,T2> function1, org.eclipse.collections.api.block.function.primitive.ShortFunction<? super T2> function2)
public static <T,V1,V2> org.eclipse.collections.api.block.function.Function<T,org.eclipse.collections.api.tuple.Pair<V1,V2>> pair(org.eclipse.collections.api.block.function.Function<? super T,V1> function1,
org.eclipse.collections.api.block.function.Function<? super T,V2> function2)
public static <K> org.eclipse.collections.api.block.function.Function<Map.Entry<K,?>,K> getKeyFunction()
Map.Entrypublic static <V> org.eclipse.collections.api.block.function.Function<Map.Entry<?,V>,V> getValueFunction()
Map.EntryCopyright © 2004–2018. All rights reserved.