Class ValueFunction<T,R>
- java.lang.Object
-
- org.wildfly.clustering.marshalling.spi.ValueFunction<T,R>
-
- All Implemented Interfaces:
DoubleFunction<R>,Function<T,R>,IntFunction<R>,LongFunction<R>
public class ValueFunction<T,R> extends Object implements Function<T,R>, IntFunction<R>, LongFunction<R>, DoubleFunction<R>
A function that always results a constant value, ignoring its parameter.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description ValueFunction(R result)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rapply(double value)Rapply(int value)Rapply(long value)Rapply(T ignored)static <T> ValueFunction<T,Void>voidFunction()Returns a function that always returns a null result, regardless of input.
-
-
-
Constructor Detail
-
ValueFunction
public ValueFunction(R result)
-
-
Method Detail
-
voidFunction
public static <T> ValueFunction<T,Void> voidFunction()
Returns a function that always returns a null result, regardless of input.- Type Parameters:
T- the function parameter type- Returns:
- a function that always returns null
-
apply
public R apply(double value)
- Specified by:
applyin interfaceDoubleFunction<T>
-
apply
public R apply(long value)
- Specified by:
applyin interfaceLongFunction<T>
-
apply
public R apply(int value)
- Specified by:
applyin interfaceIntFunction<T>
-
-