/*
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.functional.special;

import java.util.function.BiPredicate;

/**
 * Specialization of BiPredicate for integers.
 * It avoids uneccessary boxing and unboxing.
 *
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 */
public interface IntBiPredicate extends BiPredicate<Integer,Integer> {

    /**
     * non-generic version of method {@link #test(Integer, Integer)}
     *
     * @param a a
     * @param b b
     * @return bool
     */
    boolean test(int a, int b);
    
    @Override
    default boolean test(Integer a, Integer b) {
        return (null==a) ? (null==b) : (null!=b) && test(a.intValue(), b.intValue());
    }
    
}
