package javakurs.musterloesung.uebung08;

/**
 * {@link BinaryPredicate} defines the interface of a functional object used to
 * compare two instances of the argument type.
 *
 * @param <ArgumentType>
 *          the kind of arguments this predicates works on
 *
 * @author Bernd Kiefer, DFKI
 * @author Joerg Steffen, DFKI
 * @version $Id: BinaryPredicate.java,v 1.1 2011/01/04 17:52:55 steffen Exp $
 */
public interface BinaryPredicate<ArgumentType> {

  /**
   * This compares the given objects of type ArgumentTyp and returns
   * {@code true} if they are compatible.
   *
   * @param arg1
   *          the first argument
   * @param arg2
   *          the second argument
   * @return a flag indicating if the arguments are compatible
   */
  boolean compare(ArgumentType arg1, ArgumentType arg2);
}
