/*
 * Copyright (c) 2009 JSCAPE
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JSCAPE. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JSCAPE.
 *
 */

package com.jscape.util.functor.adapters;

import com.jscape.util.functor.BinaryFunction;
import com.jscape.util.functor.BinaryProcedure;

/**
 * @author Alex Usun
 */
public class BinaryProcedureFunction<F, S, R>
        extends BinaryFunction<F, S, R> {

    private BinaryProcedure<? super F, ? super S> base;

    /**
     * @param base base
     * @param <F>
     * @param <S>
     * @param <R>
     *
     * @return
     */
    public static <F, S, R> BinaryFunction<F, S, R> adapt(BinaryProcedure<? super F, ? super S> base) {
        return new BinaryProcedureFunction<F, S, R>(base);
    }

    /**
     * @param base base
     */
    public BinaryProcedureFunction(BinaryProcedure<? super F, ? super S> base) {
        this.base = base;
    }

    /**
     * @param first  first
     * @param second second
     *
     * @return R instance
     */
    public R evaluate(F first, S second) {
        this.base.evaluate(first, second);
        return null;
    }
}