class ChainFunction implements Function<T, T> {

    @Override
    public T apply(T input)
    {
        T result = input;
        for (Function<? super T, ? extends T> f : myFunctions)
        {
            result = f.apply(result);
        }
        return result;
    }

    public  ChainFunction(Collection<? extends Function<? super T, ? extends T>> functions);
    public  ChainFunction(Function<? super T, ? extends T> arg1, Function<? super T, ? extends T> arg2);

}