Package com.identityworksllc.iiq.common
Class Maybe.MaybeConsumer<T>
- java.lang.Object
 - 
- com.identityworksllc.iiq.common.Maybe.MaybeConsumer<T>
 
 
- 
- Type Parameters:
 T- The type contained within the Maybe, maybe.
public static final class Maybe.MaybeConsumer<T> extends Object implements Consumer<Maybe<T>>
A consumer extension that handles the Maybe concept.If the Maybe has a value, it will be passed to the wrapped Consumer, and if it does not, no action will be taken.
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Maybe<T> tMaybe)Performs this operation on the given argument.static <T> Maybe.MaybeConsumer<T>from(Consumer<T> wrappedConsumer)Creates a newMaybe.MaybeConsumerfrom the givenConsumer 
 - 
 
- 
- 
Method Detail
- 
from
public static <T> Maybe.MaybeConsumer<T> from(Consumer<T> wrappedConsumer)
Creates a newMaybe.MaybeConsumerfrom the givenConsumer- Type Parameters:
 T- The type of the original object being consumed- Parameters:
 wrappedConsumer- The consumer to wrap- Returns:
 - The wrapped consumer object
 
 
 - 
 
 -