Top Inners Fields Constructors Methods
org.eclipse.collections.impl.block.factory

public final Class Functions

extends Object
Class Inheritance
Imports
java.util.Map, org.eclipse.collections.api.block.SerializableComparator, org.eclipse.collections.api.block.function.Function, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .FloatFunction, .IntFunction, .LongFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.block.comparator.primitive.BooleanFunctionComparator, .ByteFunctionComparator, .CharFunctionComparator, .DoubleFunctionComparator, .FloatFunctionComparator, .IntFunctionComparator, .LongFunctionComparator, .ShortFunctionComparator, org.eclipse.collections.impl.block.function.CaseFunction, .IfFunction, org.eclipse.collections.impl.block.function.checked.CheckedFunction, .ThrowingFunction, org.eclipse.collections.impl.block.function.primitive.IntegerFunctionImpl, org.eclipse.collections.impl.tuple.Tuples, org.eclipse.collections.impl.utility.Iterate, .StringIterate

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class
public static class
public static class
public static class
private static class
private static class
private static class
public static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
public static class
public static class
private static class
public static class
public static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
public static class
public static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final CheckedFunction<String, Class<?>>
private static final Function<Object, Class<?>>
private static final Function<Double, Double>
private static final Function<Object, Boolean>
private static final Functions.FirstOfPairFunction<?>
private static final Function<Integer, Integer>
private static final Function<Long, Long>
private static final Function<?, ?>
private static final Function<?, ?>
private static final Function<Number, Double>
private static final Function<?, ?>
private static final Functions.SecondOfPairFunction<?>
private static final Function<Iterable<?>, Integer>
private static final Function<Integer, Integer>
private static final Function<String, Integer>
private static final Function<String, String>
private static final Functions.SwappedPairFunction<?, ?>
private static final Function<Object, String>
private static final Function<Object, Boolean>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T, P, R> Function<T, R>

Returns:

A new Function
bind
(Function2<? super T, ? super P, ? extends R>
The Function2 to delegate the invocation to.
function
,
P
The parameter the use in the invocation of the delegate function.
parameter
)

Bind the parameter passed to a Function2 into a new Function.

public static <T1, T2> Procedure<T1>

Returns:

A new Procedure
bind
(Procedure<? super T2>
The Procedure to delegate the invocation to.
delegate
,
Function<? super T1, T2>
The Function that will create the input for the delegate
function
)

Bind the input of a Procedure to the result of a function, returning a new Procedure.

public static <T1, T2> ObjectIntProcedure<T1>

Returns:

A new ObjectIntProcedure
bind
(ObjectIntProcedure<? super T2>
The ObjectIntProcedure to delegate the invocation to.
delegate
,
Function<? super T1, T2>
The Function that will create the input for the delegate
function
)

Bind the input of a ObjectIntProcedure to the result of a function, returning a new ObjectIntProcedure.

public static <T1, T2, T3> Procedure2<T1, T3>

Returns:

A new Procedure2
bind
(Procedure2<? super T2, T3>
The Procedure2 to delegate the invocation to.
delegate
,
Function<? super T1, T2>
The Function that will create the input for the delegate
function
)

Bind the input of the first argument of a Procedure2 to the result of a function, returning a new Procedure2.

public static <T extends Comparable<? super T>, V> CaseFunction<T, V>
caseDefault(Function<? super T, ? extends V> defaultFunction)

public static <T extends Comparable<? super T>, V> CaseFunction<T, V>
caseDefault(Function<? super T, ? extends V> defaultFunction, Predicate<? super T> predicate, Function<? super T, ? extends V> function)

public static <T, V> Function<T, V>
cast(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.

public static <T1, T2, T3> Functions.FunctionChain<T1, T2, T3>
chain(Function<T1, T2> function1, Function<? super T2, T3> function2)

public static <T1, T2> Functions.BooleanFunctionChain<T1, T2>
chainBoolean(Function<T1, T2> function1, BooleanFunction<? super T2> function2)

public static <T1, T2> Functions.ByteFunctionChain<T1, T2>
chainByte(Function<T1, T2> function1, ByteFunction<? super T2> function2)

public static <T1, T2> Functions.CharFunctionChain<T1, T2>
chainChar(Function<T1, T2> function1, CharFunction<? super T2> function2)

public static <T1, T2> Functions.DoubleFunctionChain<T1, T2>
chainDouble(Function<T1, T2> function1, DoubleFunction<? super T2> function2)

public static <T1, T2> Functions.FloatFunctionChain<T1, T2>
chainFloat(Function<T1, T2> function1, FloatFunction<? super T2> function2)

public static <T1, T2> Functions.IntFunctionChain<T1, T2>
chainInt(Function<T1, T2> function1, IntFunction<? super T2> function2)

public static <T1, T2> Functions.LongFunctionChain<T1, T2>
chainLong(Function<T1, T2> function1, LongFunction<? super T2> function2)

public static <T1, T2> Functions.ShortFunctionChain<T1, T2>
chainShort(Function<T1, T2> function1, ShortFunction<? super T2> function2)

public static Function<String, Class<?>>
public static <T1, T2, I extends Iterable<T2>> Function<T1, I>
public static <T> Function<T, String>
public static <T, V> Function<T, V>
firstNotNullValue(Function<T, V>... functions)

public static <V1> Function<Pair<V1, ?>, V1>
public static Function<Double, Double>
public static Function<Object, Boolean>
public static <T, V> Function<T, V>
getFixedValue(V value)

public static Function<Integer, Integer>
public static <K> Function<Map.Entry<K, ?>, K>

Returns:

A function that gets the key out of a java.util.Map.Entry
getKeyFunction
()

public static Function<Long, Long>
public static Function<Number, Double>
public static Function<Object, String>
public static Function<Number, Number>
public static <T> Function<T, T>
getPassThru()

Alias for identity().

public static Function<Iterable<?>, Integer>

Returns:

A function that gets the size of an Iterable
getSizeOf
()

public static Function<String, String>
public static Function<String, Integer>
public static Function<String, String>
public static Function<Object, Class<?>>
public static Function<Object, String>
public static Function<Object, Boolean>
public static <V> Function<Map.Entry<?, V>, V>

Returns:

A function that gets the value out of a java.util.Map.Entry
getValueFunction
()

public static <T> Function<T, T>
public static <T, V> Function<T, V>
ifElse(Predicate<? super T> predicate, Function<? super T, ? extends V> trueFunction, Function<? super T, ? extends V> falseFunction)

public static <T, V> Function<T, V>
ifTrue(Predicate<? super T> predicate, Function<? super T, ? extends V> function)

public static <T, V> Function<T, V>
nullSafe(Function<? super T, ? extends V> function)

public static <T, V> Function<T, V>
nullSafe(Function<? super T, ? extends V> function, V nullValue)

public static <T, V1, V2> Function<T, Pair<V1, V2>>
pair(Function<? super T, V1> function1, Function<? super T, V2> function2)

public static <V2> Function<Pair<?, V2>, V2>
public static Function<Integer, Integer>
public static <S, T> Function<Pair<S, T>, Pair<T, S>>

Returns:

A function that gets the swapped pair Iterable
swappedPair
()

Swap the input pair and return the swapped pair.

public static <T, V> Function<T, V>
synchronizedEach(Function<T, V> function)

public static <T, V> Function<T, V>
throwing(ThrowingFunction<T, V> throwingFunction)

Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Function that will throw a RuntimeException, wrapping the checked exception that is the cause.

public static <T, V> Function<T, V>
throwing(ThrowingFunction<T, V> throwingFunction, Function2<T, ? super Throwable, ? extends RuntimeException> rethrow)

Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Function that will throw a user specified RuntimeException based on the provided function.

public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T> SerializableComparator<T>
public static <T, V> Function<T, V>
withDefault(Function<? super T, ? extends V> function, V defaultValue)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait