Top Description Constructors Methods
org.apache.logging.log4j.util

public final Class LambdaUtil

extends Object
Class Inheritance
Imports
org.apache.logging.log4j.message.Message, .MessageFactory

Utility class for lambda support.

Constructor Summary

AccessConstructor and Description
private
LambdaUtil()

Private constructor: this class is not intended to be instantiated.

Method Summary

Modifier and TypeMethod and Description
public static Object

Returns:

the results of evaluating the lambda expression (or null if the supplier was null
get
(final Supplier<?>
a lambda expression or null
supplier
)
References Deprecated Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

Returns the result of evaluating the specified function.

public static Message

Returns:

the Message resulting from evaluating the lambda expression (or null if the supplier was null
get
(final MessageSupplier
a lambda expression or null
supplier
)

Returns the Message supplied by the specified function.

public static Object[]

Returns:

an array containing the results of evaluating the lambda expressions (or null if the suppliers array was null
getAll
(final Supplier<?>...
an array of lambda expressions or null
suppliers
)
References Deprecated Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

Converts an array of lambda expressions into an array of their evaluation results.

public static Message

Returns:

the Message resulting from evaluating the lambda expression or the Message created by the factory for supplied values that are not of type Message
getMessage
(final Supplier<?>
a lambda expression or null
supplier
,
final MessageFactory messageFactory)
References Deprecated Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

Returns a Message, either the value supplied by the specified function, or a new Message created by the specified Factory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LambdaUtilback to summary
private LambdaUtil()

Private constructor: this class is not intended to be instantiated.

Method Detail

getback to summary
public static Object get(final Supplier<?> supplier)

References Deprecated

Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns the result of evaluating the specified function. If the supplied value is of type Message, this method returns the result of calling #getFormattedMessage on that Message.

Parameters
supplier:Supplier<?>

a lambda expression or null

Returns:Object

the results of evaluating the lambda expression (or null if the supplier was null

Annotations
@SuppressWarnings:deprecation
getback to summary
public static Message get(final MessageSupplier supplier)

Returns the Message supplied by the specified function.

Parameters
supplier:MessageSupplier

a lambda expression or null

Returns:Message

the Message resulting from evaluating the lambda expression (or null if the supplier was null

getAllback to summary
public static Object[] getAll(final Supplier<?>... suppliers)

References Deprecated

Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Converts an array of lambda expressions into an array of their evaluation results.

Parameters
suppliers:Supplier<?>[]

an array of lambda expressions or null

Returns:Object[]

an array containing the results of evaluating the lambda expressions (or null if the suppliers array was null

Annotations
@SuppressWarnings:deprecation
getMessageback to summary
public static Message getMessage(final Supplier<?> supplier, final MessageFactory messageFactory)

References Deprecated

Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns a Message, either the value supplied by the specified function, or a new Message created by the specified Factory.

Parameters
supplier:Supplier<?>

a lambda expression or null

Returns:Message

the Message resulting from evaluating the lambda expression or the Message created by the factory for supplied values that are not of type Message

Annotations
@SuppressWarnings:deprecation