org.apache.logging.log4j.util

Class LambdaUtil



  • public final class LambdaUtil
    extends Object
    Utility class for lambda support.
    • Method Detail

      • getAll

        public 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 null if the suppliers array was null
      • get

        public static Object get(Supplier<?> supplier)
        Returns the result of evaluating the specified function.
        Parameters:
        supplier - a lambda expression or null
        Returns:
        the results of evaluating the lambda expression (or null if the supplier was null
      • get

        public 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 null if the supplier was null

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.