com.twitter.common.base
Interface Function<S,T>

Type Parameters:
S - The argument type for the function.
T - The return type for the function.
All Superinterfaces:
ExceptionalFunction<S,T,RuntimeException>, Function<S,T>

public interface Function<S,T>
extends ExceptionalFunction<S,T,RuntimeException>, Function<S,T>

A convenience typedef that also ties into google's Function.


Method Summary
 T apply(S item)
          Performs a unit of work on item, possibly throwing E in the process.
 
Methods inherited from interface com.google.common.base.Function
equals
 

Method Detail

apply

T apply(S item)
Description copied from interface: ExceptionalFunction
Performs a unit of work on item, possibly throwing E in the process.

TODO(John Sirois): consider supporting @Nullable

Specified by:
apply in interface ExceptionalFunction<S,T,RuntimeException>
Specified by:
apply in interface Function<S,T>
Parameters:
item - The item to perform work against.
Returns:
The result of the computation.