Interface Supplier<T>

  • Type Parameters:
    T - the type of values returned by this supplier
    All Superinterfaces:
    java.util.function.Supplier<T>
    All Known Subinterfaces:
    MessageSupplier
    All Known Implementing Classes:
    AsyncLogger, Logger
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    @InternalApi
    public interface Supplier<T>
    extends java.util.function.Supplier<T>
    Consider this class private. Classes implementing this interface know how to supply a value.

    This is a functional interface intended to support lambda expressions in log4j 2.

    Implementors are free to cache values or return a new or distinct value each time the supplier is invoked.

    DEPRECATED: this class will be removed in 3.0 to be replaced with the Java 8 interface.

    Since:
    2.4
    • Method Detail

      • get

        T get()
        Gets a value.
        Specified by:
        get in interface java.util.function.Supplier<T>
        Returns:
        a value