Class Functions0
- java.lang.Object
-
- org.eclipse.collections.impl.block.factory.Functions0
-
public final class Functions0 extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFunctions0.AtomicIntegerZeroFunctionprivate static classFunctions0.AtomicLongZeroFunctionprivate static classFunctions0.BigDecimalZeroFunctionprivate static classFunctions0.BigIntegerZeroFunctionprivate static classFunctions0.FalseFunctionprivate static classFunctions0.IntegerZeroFunctionprivate static classFunctions0.NewFastListFunction<T>private static classFunctions0.NewHashBagFunction<T>private static classFunctions0.NewUnifiedMapFunction<K,V>private static classFunctions0.NewUnifiedSetFunction<T>private static classFunctions0.NullFunction<T>private static classFunctions0.ThrowingFunction0Adapter<T>private static classFunctions0.TrueFunction
-
Field Summary
Fields Modifier and Type Field Description private static Functions0.AtomicIntegerZeroFunctionATOMIC_INTEGER_ZEROprivate static Functions0.AtomicLongZeroFunctionATOMIC_LONG_ZEROprivate static Functions0.BigDecimalZeroFunctionBIG_DECIMAL_ZEROprivate static Functions0.BigIntegerZeroFunctionBIG_INTEGER_ZEROprivate static Functions0.FalseFunctionFALSE_FUNCTIONprivate static Functions0.IntegerZeroFunctionINTEGER_ZEROprivate static Functions0.NewFastListFunction<?>NEW_FAST_LIST_FUNCTIONprivate static Functions0.NewHashBagFunction<?>NEW_HASH_BAG_FUNCTIONprivate static Functions0.NewUnifiedMapFunction<?,?>NEW_UNIFIED_MAP_FUNCTIONprivate static Functions0.NewUnifiedSetFunction<?>NEW_UNIFIED_SET_FUNCTIONprivate static Functions0.NullFunction<?>NULL_FUNCTIONprivate static Functions0.TrueFunctionTRUE_FUNCTION
-
Constructor Summary
Constructors Modifier Constructor Description privateFunctions0()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Function0<java.lang.Boolean>getFalse()static Function0<java.lang.Boolean>getTrue()static <T> Function0<MutableList<T>>newFastList()static <T> Function0<MutableBag<T>>newHashBag()static <K,V>
Function0<MutableMap<K,V>>newUnifiedMap()static <T> Function0<MutableSet<T>>newUnifiedSet()static <T> Function0<T>nullValue()static <T> Function0<T>throwing(ThrowingFunction0<T> throwingFunction0)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.static <T> Function0<T>throwing(ThrowingFunction0<T> throwingFunction0, Function<? super java.lang.Throwable,? extends java.lang.RuntimeException> rethrow)Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Function0 that will throw a user specified RuntimeException based on the provided function.static <T> Function0<T>value(T t)static Function0<java.util.concurrent.atomic.AtomicInteger>zeroAtomicInteger()static Function0<java.util.concurrent.atomic.AtomicLong>zeroAtomicLong()static Function0<java.math.BigDecimal>zeroBigDecimal()static Function0<java.math.BigInteger>zeroBigInteger()static Function0<java.lang.Integer>zeroInteger()
-
-
-
Field Detail
-
TRUE_FUNCTION
private static final Functions0.TrueFunction TRUE_FUNCTION
-
FALSE_FUNCTION
private static final Functions0.FalseFunction FALSE_FUNCTION
-
NEW_FAST_LIST_FUNCTION
private static final Functions0.NewFastListFunction<?> NEW_FAST_LIST_FUNCTION
-
NEW_UNIFIED_SET_FUNCTION
private static final Functions0.NewUnifiedSetFunction<?> NEW_UNIFIED_SET_FUNCTION
-
NEW_HASH_BAG_FUNCTION
private static final Functions0.NewHashBagFunction<?> NEW_HASH_BAG_FUNCTION
-
NEW_UNIFIED_MAP_FUNCTION
private static final Functions0.NewUnifiedMapFunction<?,?> NEW_UNIFIED_MAP_FUNCTION
-
NULL_FUNCTION
private static final Functions0.NullFunction<?> NULL_FUNCTION
-
ATOMIC_INTEGER_ZERO
private static final Functions0.AtomicIntegerZeroFunction ATOMIC_INTEGER_ZERO
-
ATOMIC_LONG_ZERO
private static final Functions0.AtomicLongZeroFunction ATOMIC_LONG_ZERO
-
INTEGER_ZERO
private static final Functions0.IntegerZeroFunction INTEGER_ZERO
-
BIG_DECIMAL_ZERO
private static final Functions0.BigDecimalZeroFunction BIG_DECIMAL_ZERO
-
BIG_INTEGER_ZERO
private static final Functions0.BigIntegerZeroFunction BIG_INTEGER_ZERO
-
-
Method Detail
-
getTrue
public static Function0<java.lang.Boolean> getTrue()
- Since:
- 6.0
-
getFalse
public static Function0<java.lang.Boolean> getFalse()
- Since:
- 6.0
-
newFastList
public static <T> Function0<MutableList<T>> newFastList()
-
newUnifiedSet
public static <T> Function0<MutableSet<T>> newUnifiedSet()
-
newHashBag
public static <T> Function0<MutableBag<T>> newHashBag()
-
newUnifiedMap
public static <K,V> Function0<MutableMap<K,V>> newUnifiedMap()
-
throwing
public static <T> Function0<T> throwing(ThrowingFunction0<T> throwingFunction0)
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.
-
throwing
public static <T> Function0<T> throwing(ThrowingFunction0<T> throwingFunction0, Function<? super java.lang.Throwable,? extends java.lang.RuntimeException> rethrow)
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Function0 that will throw a user specified RuntimeException based on the provided function. The function is passed the current element and the checked exception that was thrown as context arguments.
-
nullValue
public static <T> Function0<T> nullValue()
-
value
public static <T> Function0<T> value(T t)
-
zeroInteger
public static Function0<java.lang.Integer> zeroInteger()
-
zeroAtomicInteger
public static Function0<java.util.concurrent.atomic.AtomicInteger> zeroAtomicInteger()
-
zeroAtomicLong
public static Function0<java.util.concurrent.atomic.AtomicLong> zeroAtomicLong()
-
zeroBigDecimal
public static Function0<java.math.BigDecimal> zeroBigDecimal()
- Since:
- 6.0
-
zeroBigInteger
public static Function0<java.math.BigInteger> zeroBigInteger()
- Since:
- 6.0
-
-