Class Functions0
java.lang.Object
org.eclipse.collections.impl.block.factory.Functions0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Functions0.AtomicIntegerZeroFunction
private static final Functions0.AtomicLongZeroFunction
private static final Functions0.BigDecimalZeroFunction
private static final Functions0.BigIntegerZeroFunction
private static final Functions0.FalseFunction
private static final Functions0.IntegerZeroFunction
private static final Functions0.NewFastListFunction
<?> private static final Functions0.NewHashBagFunction
<?> private static final Functions0.NewUnifiedMapFunction
<?, ?> private static final Functions0.NewUnifiedSetFunction
<?> private static final Functions0.NullFunction
<?> private static final Functions0.TrueFunction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFalse()
getTrue()
static <T> Function0
<MutableList<T>> static <T> Function0
<MutableBag<T>> static <K,
V> Function0 <MutableMap<K, V>> static <T> Function0
<MutableSet<T>> static <T> Function0
<T> 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 Throwable, ? extends 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
<AtomicInteger> static Function0
<AtomicLong> static Function0
<BigDecimal> static Function0
<BigInteger>
-
Field Details
-
TRUE_FUNCTION
-
FALSE_FUNCTION
-
NEW_FAST_LIST_FUNCTION
-
NEW_UNIFIED_SET_FUNCTION
-
NEW_HASH_BAG_FUNCTION
-
NEW_UNIFIED_MAP_FUNCTION
-
NULL_FUNCTION
-
ATOMIC_INTEGER_ZERO
-
ATOMIC_LONG_ZERO
-
INTEGER_ZERO
-
BIG_DECIMAL_ZERO
-
BIG_INTEGER_ZERO
-
-
Constructor Details
-
Functions0
private Functions0()
-
-
Method Details
-
getTrue
- Since:
- 6.0
-
getFalse
- Since:
- 6.0
-
newFastList
-
newUnifiedSet
-
newHashBag
-
newUnifiedMap
-
throwing
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 Throwable, ? extends 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
-
value
-
zeroInteger
-
zeroAtomicInteger
-
zeroAtomicLong
-
zeroBigDecimal
- Since:
- 6.0
-
zeroBigInteger
- Since:
- 6.0
-