Package | Description |
---|---|
org.apache.commons.lang3.builder |
Assists in creating consistent
equals(Object) , toString() , hashCode() , and compareTo(Object) methods. |
org.apache.commons.lang3.concurrent |
Provides support classes for multi-threaded programming.
|
org.apache.commons.lang3.function |
Provides functional interfaces to complement those in
java.lang.function and utilities for working with Java
8 lambdas. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractSupplier<T,B extends AbstractSupplier<T,B,E>,E extends Throwable>
Abstracts supplying an instance of
T . |
Modifier and Type | Interface and Description |
---|---|
interface |
ConcurrentInitializer<T>
Defines the thread-safe initialization of objects.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractConcurrentInitializer<T,E extends Exception>
Abstracts and defines operations for ConcurrentInitializer implementations.
|
static class |
AbstractConcurrentInitializer.AbstractBuilder<I extends AbstractConcurrentInitializer<T,E>,T,B extends AbstractConcurrentInitializer.AbstractBuilder<I,T,B,E>,E extends Exception>
Builds a new instance for subclasses.
|
class |
AtomicInitializer<T>
A specialized implementation of the
ConcurrentInitializer interface
based on an AtomicReference variable. |
static class |
AtomicInitializer.Builder<I extends AtomicInitializer<T>,T>
Builds a new instance.
|
class |
AtomicSafeInitializer<T>
A specialized
ConcurrentInitializer implementation which is similar
to AtomicInitializer , but ensures that the AbstractConcurrentInitializer.initialize()
method is called only once. |
static class |
AtomicSafeInitializer.Builder<I extends AtomicSafeInitializer<T>,T>
Builds a new instance.
|
class |
BackgroundInitializer<T>
A class that allows complex initialization operations in a background task.
|
static class |
BackgroundInitializer.Builder<I extends BackgroundInitializer<T>,T>
Builds a new instance.
|
class |
CallableBackgroundInitializer<T>
A specialized
BackgroundInitializer implementation that wraps a
Callable object. |
class |
ConstantInitializer<T>
A very simple implementation of the
ConcurrentInitializer interface
which always returns the same object. |
class |
LazyInitializer<T>
This class provides a generic implementation of the lazy initialization pattern.
|
static class |
LazyInitializer.Builder<I extends LazyInitializer<T>,T>
Builds a new instance.
|
class |
MultiBackgroundInitializer
A specialized
BackgroundInitializer implementation that can deal with
multiple background initialization tasks. |
Modifier and Type | Method and Description |
---|---|
FailableSupplier<T,? extends Exception> |
AbstractConcurrentInitializer.AbstractBuilder.getInitializer()
Gets the initializer supplier called by
AbstractConcurrentInitializer.initialize() . |
Modifier and Type | Method and Description |
---|---|
B |
AbstractConcurrentInitializer.AbstractBuilder.setInitializer(FailableSupplier<T,? extends Exception> initializer)
Sets the initializer supplier called by
AbstractConcurrentInitializer.initialize() . |
Modifier and Type | Field and Description |
---|---|
static FailableSupplier |
FailableSupplier.NUL
Returns the singleton supplier that always returns null.
|
Modifier and Type | Method and Description |
---|---|
static <R> FailableSupplier<R,Throwable> |
MethodInvokers.asFailableSupplier(Method method)
Produces a
FailableSupplier for a given a supplier Method. |
static <T,E extends Exception> |
FailableSupplier.nul()
Returns the singleton supplier that always returns null.
|
Modifier and Type | Method and Description |
---|---|
static <T> Supplier<T> |
Failable.asSupplier(FailableSupplier<T,?> supplier)
Converts the given
FailableSupplier into a standard Supplier . |
static <T,E extends Throwable> |
Failable.get(FailableSupplier<T,E> supplier)
Invokes a supplier, and returns the result.
|
Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.