public abstract class Functions extends Object
Provides functions used in transformation operations.
| Modifier and Type | Class and Description |
|---|---|
static class |
Functions.FromOptional<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> com.google.common.base.Function<Optional<T>,T> |
fromOptional(T defaultValue)
Returns a function that returns the referenced value of each
Optional or the given default if a value is not present. |
static boolean |
isNullFunction(com.google.common.base.Function<?,?> function) |
static <F,T> com.google.common.base.Function<F,T> |
nullFunction() |
public static <F,T> com.google.common.base.Function<F,T> nullFunction()
public static boolean isNullFunction(com.google.common.base.Function<?,?> function)
public static <T> com.google.common.base.Function<Optional<T>,T> fromOptional(T defaultValue)
Returns a function that returns the referenced value of each Optional or the given default if a value is not present.
T - the type of the valuedefaultValue - the default value to transform to if no value is present on the Optional, default value may be nullOptionals to their values or the default valueOptional#or(Object)Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.