com.opensymphony.xwork2.inject.util

## Interface Function<F,T>

-     public interface Function<F,T>

  A Function provides a transformation on an object and returns the resulting object. For example, a `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.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    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`.

- - ### Method Detail

    - #### apply

          T apply(F from)

      Applies the function to an object of type `F`, resulting in an object of type `T`. Note that types `F` and `T` may or may not be the same.
      Parameters:
        `from` - The source object.
      Returns:
        The resulting object.

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.