Top Description Constructors Methods
org.codehaus.commons.compiler.java8.java.util.function

public final Class Consumers

extends Object
Class Inheritance
Imports
org.codehaus.commons.compiler.util.reflect.Classes, .Methods, .NoException, .Proxies

Helper methods for the Consumer facade.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T> Consumer<T>

Returns:

A Consumer that forwards all invocations of Consumer#accept(Object) to the delegate
from
(final Object
Must be a java.util.Consumer
delegate
)

public static <T> Object

Returns:

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Consumersback to summary
private Consumers()

Method Detail

fromback to summary
public static <T> Consumer<T> from(final Object delegate)
Parameters
delegate:Object

Must be a java.util.Consumer

Returns:Consumer<T>

A Consumer that forwards all invocations of Consumer#accept(Object) to the delegate

fromback to summary
public static <T> Object from(Consumer<T> delegate)
Returns:Object

A java.util.Consumer that forwards all invocations of accept(T) to the delegate.