Class Functions

java.lang.Object
org.jboss.resteasy.spi.util.Functions

public class Functions extends Object
A simple utility for various functions.
Author:
James R. Perkins
  • Method Details

    • singleton

      public static <T> Supplier<T> singleton(Supplier<T> generator)
      Creates a supplier which loads the value at most once with the provided generator.
      Type Parameters:
      T - the type of result
      Parameters:
      generator - the generator to load the value
      Returns:
      a singleton supplier