/*
 * 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;

/**
 * @author Alex Usun
 */
@SuppressWarnings("unchecked")
public class FirstIdentity<F, S, R>
        extends BinaryFunction<F, S, R> {

    /**
     * @param <F> <F>
     * @param <S> <S>
     * @param <R> <R>
     *
     * @return BinaryFunction instance
     */
    public static <F, S, R> BinaryFunction<F, S, R> instance() {
        return new FirstIdentity<F, S, R>();
    }

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