All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fissore.slf4j.Util Maven / Gradle / Ivy

There is a newer version: 0.14.0
Show newest version
package org.fissore.slf4j;

import java.util.function.Supplier;

public class Util {

  private Util() {
  }

  /**
   * Casts a lambda to a Supplier. Best used once statically imported.
   * 
   * import static org.fissore.slf4j.Util.lazy;
   *
   * ...
   *
   * logger.error().log("This is a {}", lazy(() -> "test"));
   * 
* * @param supplier the lambda to cast * @return a Supplier */ public static Supplier lazy(Supplier supplier) { return supplier; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy