public interface Function<F,T>
StringToIntegerFunction
may implement
Function<String,Integer>
and transform integers in String
format to Integer format.
The transformation on the source object does not necessarily result in
an object of a different type. For example, a
FarenheitToCelciusFunction
may implement
Function<Float,Float>
.
Implementors of Function which may cause side effects upon evaluation are strongly encouraged to state this fact clearly in their API documentation.
Modifier and Type | Method and Description |
---|---|
T |
apply(F from)
Applies the function to an object of type
F , resulting in an object
of type T . |
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.