Package org.apache.logging.log4j.util
Class LambdaUtil
- java.lang.Object
- 
- org.apache.logging.log4j.util.LambdaUtil
 
- 
 public final class LambdaUtil extends Object Utility class for lambda support.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Messageget(MessageSupplier supplier)Returns the Message supplied by the specified function.static Objectget(Supplier<?> supplier)Returns the result of evaluating the specified function.static Object[]getAll(Supplier<?>... suppliers)Converts an array of lambda expressions into an array of their evaluation results.static MessagegetMessage(Supplier<?> supplier, MessageFactory messageFactory)Returns a Message, either the value supplied by the specified function, or a new Message created by the specified Factory.
 
- 
- 
- 
Method Detail- 
getAllpublic static Object[] getAll(Supplier<?>... suppliers) Converts an array of lambda expressions into an array of their evaluation results.- Parameters:
- suppliers- an array of lambda expressions or- null
- Returns:
- an array containing the results of evaluating the lambda expressions (or nullif the suppliers array wasnull
 
 - 
getpublic static Object get(Supplier<?> supplier) Returns the result of evaluating the specified function. If the supplied value is of type Message, this method returns the result of calling#getFormattedMessageon that Message.- Parameters:
- supplier- a lambda expression or- null
- Returns:
- the results of evaluating the lambda expression (or nullif the supplier wasnull
 
 - 
getpublic static Message get(MessageSupplier supplier) Returns the Message supplied by the specified function.- Parameters:
- supplier- a lambda expression or- null
- Returns:
- the Message resulting from evaluating the lambda expression (or nullif the supplier wasnull
 
 - 
getMessagepublic static Message getMessage(Supplier<?> supplier, MessageFactory messageFactory) Returns a Message, either the value supplied by the specified function, or a new Message created by the specified Factory.- Parameters:
- supplier- a lambda expression or- null
- 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
 
 
- 
 
-