java.lang.Object
org.codehaus.commons.compiler.java8.java.util.function.Consumers

public final class Consumers extends Object
Helper methods for the Consumer facade.
  • Constructor Details

    • Consumers

      private Consumers()
  • Method Details

    • from

      public static <T> Consumer<T> from(Object delegate)
      Parameters:
      delegate - Must be a java.util.Consumer
      Returns:
      A Consumer that forwards all invocations of Consumer.accept(Object) to the delegate
    • from

      public static <T> Object from(Consumer<T> delegate)
      Returns:
      A java.util.Consumer that forwards all invocations of accept(T) to the delegate.