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

public final Class Functions0

extends Object
Class Inheritance
Imports
java.math.BigDecimal, .BigInteger, java.util.concurrent.atomic.AtomicInteger, .AtomicLong, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.block.function.Function, .Function0, org.eclipse.collections.api.factory.Bags, .Lists, .Maps, .Sets, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.map.MutableMap, org.eclipse.collections.api.set.MutableSet, org.eclipse.collections.impl.block.function.PassThruFunction0, org.eclipse.collections.impl.block.function.checked.CheckedFunction0, .ThrowingFunction0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private 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
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private 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

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Function0<Boolean>
public static Function0<Boolean>
public static <T> Function0<MutableList<T>>
public static <T> Function0<MutableBag<T>>
public static <K, V> Function0<MutableMap<K, V>>
public static <T> Function0<MutableSet<T>>
public static <T> Function0<T>
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.

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.

public static <T> Function0<T>
value(T t)

public static Function0<AtomicInteger>
public static Function0<AtomicLong>
public static Function0<BigDecimal>
public static Function0<BigInteger>
public static Function0<Integer>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ATOMIC_INTEGER_ZEROback to summary
private static final Functions0.AtomicIntegerZeroFunction ATOMIC_INTEGER_ZERO
ATOMIC_LONG_ZEROback to summary
private static final Functions0.AtomicLongZeroFunction ATOMIC_LONG_ZERO
BIG_DECIMAL_ZEROback to summary
private static final Functions0.BigDecimalZeroFunction BIG_DECIMAL_ZERO
BIG_INTEGER_ZEROback to summary
private static final Functions0.BigIntegerZeroFunction BIG_INTEGER_ZERO
FALSE_FUNCTIONback to summary
private static final Functions0.FalseFunction FALSE_FUNCTION
INTEGER_ZEROback to summary
private static final Functions0.IntegerZeroFunction INTEGER_ZERO
NEW_FAST_LIST_FUNCTIONback to summary
private static final Functions0.NewFastListFunction<?> NEW_FAST_LIST_FUNCTION
NEW_HASH_BAG_FUNCTIONback to summary
private static final Functions0.NewHashBagFunction<?> NEW_HASH_BAG_FUNCTION
NEW_UNIFIED_MAP_FUNCTIONback to summary
private static final Functions0.NewUnifiedMapFunction<?, ?> NEW_UNIFIED_MAP_FUNCTION
NEW_UNIFIED_SET_FUNCTIONback to summary
private static final Functions0.NewUnifiedSetFunction<?> NEW_UNIFIED_SET_FUNCTION
NULL_FUNCTIONback to summary
private static final Functions0.NullFunction<?> NULL_FUNCTION
TRUE_FUNCTIONback to summary
private static final Functions0.TrueFunction TRUE_FUNCTION

Constructor Detail

Functions0back to summary
private Functions0()

Method Detail

getFalseback to summary
public static Function0<Boolean> getFalse()
Since
6.0
getTrueback to summary
public static Function0<Boolean> getTrue()
Since
6.0
newFastListback to summary
public static <T> Function0<MutableList<T>> newFastList()
newHashBagback to summary
public static <T> Function0<MutableBag<T>> newHashBag()
newUnifiedMapback to summary
public static <K, V> Function0<MutableMap<K, V>> newUnifiedMap()
newUnifiedSetback to summary
public static <T> Function0<MutableSet<T>> newUnifiedSet()
nullValueback to summary
public static <T> Function0<T> nullValue()
throwingback to summary
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.

throwingback to summary
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.

valueback to summary
public static <T> Function0<T> value(T t)
zeroAtomicIntegerback to summary
public static Function0<AtomicInteger> zeroAtomicInteger()
zeroAtomicLongback to summary
public static Function0<AtomicLong> zeroAtomicLong()
zeroBigDecimalback to summary
public static Function0<BigDecimal> zeroBigDecimal()
Since
6.0
zeroBigIntegerback to summary
public static Function0<BigInteger> zeroBigInteger()
Since
6.0
zeroIntegerback to summary
public static Function0<Integer> zeroInteger()
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.AtomicIntegerZeroFunction

extends Object
implements Function0<AtomicInteger>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.AtomicIntegerZeroFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public AtomicInteger
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AtomicIntegerZeroFunctionback to summary
private AtomicIntegerZeroFunction()

Method Detail

valueback to summary
public AtomicInteger value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.AtomicLongZeroFunction

extends Object
implements Function0<AtomicLong>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.AtomicLongZeroFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public AtomicLong
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AtomicLongZeroFunctionback to summary
private AtomicLongZeroFunction()

Method Detail

valueback to summary
public AtomicLong value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.BigDecimalZeroFunction

extends Object
implements Function0<BigDecimal>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.BigDecimalZeroFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public BigDecimal
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BigDecimalZeroFunctionback to summary
private BigDecimalZeroFunction()

Method Detail

valueback to summary
public BigDecimal value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.BigIntegerZeroFunction

extends Object
implements Function0<BigInteger>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.BigIntegerZeroFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public BigInteger
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BigIntegerZeroFunctionback to summary
private BigIntegerZeroFunction()

Method Detail

valueback to summary
public BigInteger value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.FalseFunction

extends Object
implements Function0<Boolean>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.FalseFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

FalseFunctionback to summary
private FalseFunction()

Method Detail

valueback to summary
public Boolean value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.IntegerZeroFunction

extends Object
implements Function0<Integer>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.IntegerZeroFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Integer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

IntegerZeroFunctionback to summary
private IntegerZeroFunction()

Method Detail

valueback to summary
public Integer value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.NewFastListFunction<T>

extends Object
implements Function0<MutableList<T>>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.NewFastListFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MutableList<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

NewFastListFunctionback to summary
private NewFastListFunction()

Method Detail

valueback to summary
public MutableList<T> value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.NewHashBagFunction<T>

extends Object
implements Function0<MutableBag<T>>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.NewHashBagFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MutableBag<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

NewHashBagFunctionback to summary
private NewHashBagFunction()

Method Detail

valueback to summary
public MutableBag<T> value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.NewUnifiedMapFunction<K, V>

extends Object
implements Function0<MutableMap<K, V>>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.NewUnifiedMapFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MutableMap<K, V>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

NewUnifiedMapFunctionback to summary
private NewUnifiedMapFunction()

Method Detail

valueback to summary
public MutableMap<K, V> value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.NewUnifiedSetFunction<T>

extends Object
implements Function0<MutableSet<T>>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.NewUnifiedSetFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MutableSet<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

NewUnifiedSetFunctionback to summary
private NewUnifiedSetFunction()

Method Detail

valueback to summary
public MutableSet<T> value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.NullFunction<T>

extends Object
implements Function0<T>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.NullFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

NullFunctionback to summary
private NullFunction()

Method Detail

valueback to summary
public T value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.ThrowingFunction0Adapter<T>

extends CheckedFunction0<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long
private final ThrowingFunction0<T>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public T
Inherited from org.eclipse.collections.impl.block.function.checked.CheckedFunction0:
value

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.block.function.checked.CheckedFunction0.serialVersionUID.

throwingFunction0back to summary
private final ThrowingFunction0<T> throwingFunction0

Constructor Detail

ThrowingFunction0Adapterback to summary
private ThrowingFunction0Adapter(ThrowingFunction0<T> throwingFunction0)

Method Detail

safeValueback to summary
public T safeValue() throws Exception

Implements org.eclipse.collections.impl.block.function.checked.ThrowingFunction0.safeValue.

Annotations
@Override
org.eclipse.collections.impl.block.factory back to summary

private final Class Functions0.TrueFunction

extends Object
implements Function0<Boolean>
Class Inheritance
  • java.lang.Object
  • org.eclipse.collections.impl.block.factory.Functions0.TrueFunction
All Implemented Interfaces
org.eclipse.collections.api.block.function.Function0, java.io.Serializable, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

TrueFunctionback to summary
private TrueFunction()

Method Detail

valueback to summary
public Boolean value()

Implements org.eclipse.collections.api.block.function.Function0.value.

Annotations
@Override