Modifier and Type | Method and Description |
---|---|
static <T> Function<Object,T> |
returnConstant(T constant)
A
Function that always ignores its argument and returns a constant value. |
static <T> Function<Object,T> |
returnNull()
A
Function that always ignores its argument and returns null . |
static Function<Object,String> |
returnToString()
A
Function that always returns the Object.toString() value of the input. |
static <T> Function<Object,T> |
throwAssertionError()
A
Function that always ignores its argument and throws an AssertionError . |
static <T> Function<Object,T> |
throwIllegalArgumentException()
A
Function that always ignores its argument and throws an IllegalArgumentException . |
public static <T> Function<Object,T> returnNull()
Function
that always ignores its argument and returns null
.Function
that always ignores its argument and returns null
.public static <T> Function<Object,T> returnConstant(T constant)
Function
that always ignores its argument and returns a constant value.Function
that always ignores its argument and returns a constant value.public static Function<Object,String> returnToString()
Function
that always returns the Object.toString()
value of the input.Function
that always returns the Object.toString()
value of the input.public static <T> Function<Object,T> throwIllegalArgumentException()
Function
that always ignores its argument and throws an IllegalArgumentException
.Function
that always ignores its argument and throws an IllegalArgumentException
.public static <T> Function<Object,T> throwAssertionError()
Function
that always ignores its argument and throws an AssertionError
.Function
that always ignores its argument and throws an AssertionError
.