public final class Functions
extends java.lang.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> com.gs.collections.api.block.function.Function<T,R> |
bind(com.gs.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> com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<T1> |
bind(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T2> delegate,
com.gs.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> com.gs.collections.api.block.procedure.Procedure<T1> |
bind(com.gs.collections.api.block.procedure.Procedure<? super T2> delegate,
com.gs.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> com.gs.collections.api.block.procedure.Procedure2<T1,T3> |
bind(com.gs.collections.api.block.procedure.Procedure2<? super T2,T3> delegate,
com.gs.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 java.lang.Comparable<? super T>,V> |
caseDefault(com.gs.collections.api.block.function.Function<? super T,? extends V> defaultFunction) |
static <T extends java.lang.Comparable<? super T>,V> |
caseDefault(com.gs.collections.api.block.function.Function<? super T,? extends V> defaultFunction,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T1,T2,T3> Functions.FunctionChain<T1,T2,T3> |
chain(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.Function<? super T2,T3> function2) |
static <T1,T2> Functions.BooleanFunctionChain<T1,T2> |
chainBoolean(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T2> function2) |
static <T1,T2> Functions.ByteFunctionChain<T1,T2> |
chainByte(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T2> function2) |
static <T1,T2> Functions.CharFunctionChain<T1,T2> |
chainChar(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.CharFunction<? super T2> function2) |
static <T1,T2> Functions.DoubleFunctionChain<T1,T2> |
chainDouble(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T2> function2) |
static <T1,T2> Functions.FloatFunctionChain<T1,T2> |
chainFloat(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T2> function2) |
static <T1,T2> Functions.IntFunctionChain<T1,T2> |
chainInt(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.IntFunction<? super T2> function2) |
static <T1,T2> Functions.LongFunctionChain<T1,T2> |
chainLong(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.LongFunction<? super T2> function2) |
static <T1,T2> Functions.ShortFunctionChain<T1,T2> |
chainShort(com.gs.collections.api.block.function.Function<T1,T2> function1,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T2> function2) |
static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.Class<?>> |
classForName() |
static <T1,T2,I extends java.lang.Iterable<T2>> |
firstNotEmptyCollectionValue(com.gs.collections.api.block.function.Function<T1,I>... functions) |
static <T> com.gs.collections.api.block.function.Function<T,java.lang.String> |
firstNotEmptyStringValue(com.gs.collections.api.block.function.Function<T,java.lang.String>... functions) |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
firstNotNullValue(com.gs.collections.api.block.function.Function<T,V>... functions) |
static <V1> com.gs.collections.api.block.function.Function<com.gs.collections.api.tuple.Pair<V1,?>,V1> |
firstOfPair() |
static com.gs.collections.api.block.function.Function<java.lang.Double,java.lang.Double> |
getDoublePassThru() |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
getFixedValue(V value) |
static com.gs.collections.api.block.function.Function<java.lang.Integer,java.lang.Integer> |
getIntegerPassThru() |
static <K> com.gs.collections.api.block.function.Function<java.util.Map.Entry<K,?>,K> |
getKeyFunction() |
static com.gs.collections.api.block.function.Function<java.lang.Long,java.lang.Long> |
getLongPassThru() |
static com.gs.collections.api.block.function.Function<java.lang.Number,java.lang.Double> |
getMathSinFunction() |
static com.gs.collections.api.block.function.Function<java.lang.Object,java.lang.String> |
getNullSafeToString(java.lang.String defaultValue) |
static com.gs.collections.api.block.function.Function<java.lang.Number,java.lang.Number> |
getNumberPassThru() |
static <T> com.gs.collections.api.block.function.Function<T,T> |
getPassThru() |
static com.gs.collections.api.block.function.Function<java.lang.Iterable<?>,java.lang.Integer> |
getSizeOf() |
static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.String> |
getStringPassThru() |
static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.Integer> |
getStringToInteger() |
static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.String> |
getStringTrim() |
static com.gs.collections.api.block.function.Function<java.lang.Object,java.lang.Class<?>> |
getToClass() |
static com.gs.collections.api.block.function.Function<java.lang.Object,java.lang.String> |
getToString() |
static <V> com.gs.collections.api.block.function.Function<java.util.Map.Entry<?,V>,V> |
getValueFunction() |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
ifElse(com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> trueFunction,
com.gs.collections.api.block.function.Function<? super T,? extends V> falseFunction) |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
ifTrue(com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
nullSafe(com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
nullSafe(com.gs.collections.api.block.function.Function<? super T,? extends V> function,
V nullValue) |
static <T,V1,V2> com.gs.collections.api.block.function.Function<T,com.gs.collections.api.tuple.Pair<V1,V2>> |
pair(com.gs.collections.api.block.function.Function<T,V1> function1,
com.gs.collections.api.block.function.Function<T,V2> function2) |
static <V2> com.gs.collections.api.block.function.Function<com.gs.collections.api.tuple.Pair<?,V2>,V2> |
secondOfPair() |
static com.gs.collections.api.block.function.Function<java.lang.Integer,java.lang.Integer> |
squaredInteger() |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
synchronizedEach(com.gs.collections.api.block.function.Function<T,V> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toBooleanComparator(com.gs.collections.api.block.function.primitive.BooleanFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toByteComparator(com.gs.collections.api.block.function.primitive.ByteFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toCharComparator(com.gs.collections.api.block.function.primitive.CharFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toDoubleComparator(com.gs.collections.api.block.function.primitive.DoubleFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toFloatComparator(com.gs.collections.api.block.function.primitive.FloatFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toIntComparator(com.gs.collections.api.block.function.primitive.IntFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toLongComparator(com.gs.collections.api.block.function.primitive.LongFunction<T> function) |
static <T> com.gs.collections.api.block.SerializableComparator<T> |
toShortComparator(com.gs.collections.api.block.function.primitive.ShortFunction<T> function) |
static <T,V> com.gs.collections.api.block.function.Function<T,V> |
withDefault(com.gs.collections.api.block.function.Function<? super T,? extends V> function,
V defaultValue) |
public static <T> com.gs.collections.api.block.function.Function<T,T> getPassThru()
public static <T,V> com.gs.collections.api.block.function.Function<T,V> getFixedValue(V value)
public static com.gs.collections.api.block.function.Function<java.lang.Object,java.lang.Class<?>> getToClass()
public static com.gs.collections.api.block.function.Function<java.lang.Number,java.lang.Double> getMathSinFunction()
public static com.gs.collections.api.block.function.Function<java.lang.Number,java.lang.Number> getNumberPassThru()
public static com.gs.collections.api.block.function.Function<java.lang.Integer,java.lang.Integer> getIntegerPassThru()
public static com.gs.collections.api.block.function.Function<java.lang.Long,java.lang.Long> getLongPassThru()
public static com.gs.collections.api.block.function.Function<java.lang.Double,java.lang.Double> getDoublePassThru()
public static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.String> getStringPassThru()
public static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.String> getStringTrim()
public static com.gs.collections.api.block.function.Function<java.lang.Object,java.lang.String> getToString()
public static com.gs.collections.api.block.function.Function<java.lang.Object,java.lang.String> getNullSafeToString(java.lang.String defaultValue)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toBooleanComparator(com.gs.collections.api.block.function.primitive.BooleanFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toByteComparator(com.gs.collections.api.block.function.primitive.ByteFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toCharComparator(com.gs.collections.api.block.function.primitive.CharFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toFloatComparator(com.gs.collections.api.block.function.primitive.FloatFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toShortComparator(com.gs.collections.api.block.function.primitive.ShortFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toIntComparator(com.gs.collections.api.block.function.primitive.IntFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toDoubleComparator(com.gs.collections.api.block.function.primitive.DoubleFunction<T> function)
public static <T> com.gs.collections.api.block.SerializableComparator<T> toLongComparator(com.gs.collections.api.block.function.primitive.LongFunction<T> function)
public static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.Integer> getStringToInteger()
public static <T,V> com.gs.collections.api.block.function.Function<T,V> withDefault(com.gs.collections.api.block.function.Function<? super T,? extends V> function,
V defaultValue)
public static <T,V> com.gs.collections.api.block.function.Function<T,V> nullSafe(com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V> com.gs.collections.api.block.function.Function<T,V> nullSafe(com.gs.collections.api.block.function.Function<? super T,? extends V> function,
V nullValue)
public static <V1> com.gs.collections.api.block.function.Function<com.gs.collections.api.tuple.Pair<V1,?>,V1> firstOfPair()
public static <V2> com.gs.collections.api.block.function.Function<com.gs.collections.api.tuple.Pair<?,V2>,V2> secondOfPair()
public static <T,P,R> com.gs.collections.api.block.function.Function<T,R> bind(com.gs.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> com.gs.collections.api.block.procedure.Procedure<T1> bind(com.gs.collections.api.block.procedure.Procedure<? super T2> delegate,
com.gs.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> com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<T1> bind(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T2> delegate,
com.gs.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> com.gs.collections.api.block.procedure.Procedure2<T1,T3> bind(com.gs.collections.api.block.procedure.Procedure2<? super T2,T3> delegate,
com.gs.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 com.gs.collections.api.block.function.Function<java.lang.Integer,java.lang.Integer> squaredInteger()
public static <T,V> com.gs.collections.api.block.function.Function<T,V> firstNotNullValue(com.gs.collections.api.block.function.Function<T,V>... functions)
public static <T> com.gs.collections.api.block.function.Function<T,java.lang.String> firstNotEmptyStringValue(com.gs.collections.api.block.function.Function<T,java.lang.String>... functions)
public static <T1,T2,I extends java.lang.Iterable<T2>> com.gs.collections.api.block.function.Function<T1,I> firstNotEmptyCollectionValue(com.gs.collections.api.block.function.Function<T1,I>... functions)
public static <T,V> com.gs.collections.api.block.function.Function<T,V> ifTrue(com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V> com.gs.collections.api.block.function.Function<T,V> ifElse(com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> trueFunction,
com.gs.collections.api.block.function.Function<? super T,? extends V> falseFunction)
public static <T extends java.lang.Comparable<? super T>,V> CaseFunction<T,V> caseDefault(com.gs.collections.api.block.function.Function<? super T,? extends V> defaultFunction)
public static <T extends java.lang.Comparable<? super T>,V> CaseFunction<T,V> caseDefault(com.gs.collections.api.block.function.Function<? super T,? extends V> defaultFunction, com.gs.collections.api.block.predicate.Predicate<? super T> predicate, com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V> com.gs.collections.api.block.function.Function<T,V> synchronizedEach(com.gs.collections.api.block.function.Function<T,V> function)
public static com.gs.collections.api.block.function.Function<java.lang.String,java.lang.Class<?>> classForName()
public static <T1,T2,T3> Functions.FunctionChain<T1,T2,T3> chain(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.Function<? super T2,T3> function2)
public static <T1,T2> Functions.BooleanFunctionChain<T1,T2> chainBoolean(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.BooleanFunction<? super T2> function2)
public static <T1,T2> Functions.ByteFunctionChain<T1,T2> chainByte(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.ByteFunction<? super T2> function2)
public static <T1,T2> Functions.CharFunctionChain<T1,T2> chainChar(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.CharFunction<? super T2> function2)
public static <T1,T2> Functions.DoubleFunctionChain<T1,T2> chainDouble(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.DoubleFunction<? super T2> function2)
public static <T1,T2> Functions.FloatFunctionChain<T1,T2> chainFloat(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.FloatFunction<? super T2> function2)
public static <T1,T2> Functions.IntFunctionChain<T1,T2> chainInt(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.IntFunction<? super T2> function2)
public static <T1,T2> Functions.LongFunctionChain<T1,T2> chainLong(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.LongFunction<? super T2> function2)
public static <T1,T2> Functions.ShortFunctionChain<T1,T2> chainShort(com.gs.collections.api.block.function.Function<T1,T2> function1, com.gs.collections.api.block.function.primitive.ShortFunction<? super T2> function2)
public static <T,V1,V2> com.gs.collections.api.block.function.Function<T,com.gs.collections.api.tuple.Pair<V1,V2>> pair(com.gs.collections.api.block.function.Function<T,V1> function1,
com.gs.collections.api.block.function.Function<T,V2> function2)
public static <K> com.gs.collections.api.block.function.Function<java.util.Map.Entry<K,?>,K> getKeyFunction()
Map.Entrypublic static <V> com.gs.collections.api.block.function.Function<java.util.Map.Entry<?,V>,V> getValueFunction()
Map.Entrypublic static com.gs.collections.api.block.function.Function<java.lang.Iterable<?>,java.lang.Integer> getSizeOf()
Iterable