org.apache.shiro.functor
Interface Translator<I,O>

Type Parameters:
I - The input type
O - The output type

public interface Translator<I,O>

Generic functor interface representing a data translation (or conversion) operation. For a given input, a Translator can translate an input argument into a potentially different output value.

One example of where this is particularly convenient is API translation: translating a 3rd-party framework Exception to a Shiro Exception or vice-versa.

Since:
1.2

Method Summary
 O translate(I input)
          Translates the input argument into the required output instance.
 

Method Detail

translate

O translate(I input)
Translates the input argument into the required output instance.

Parameters:
input - the input data to translate
Returns:
the translated output data
Since:
1.2


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.