1 pnkfelix 1.1.2.1 // BinaryRelation.java, created Sat Feb  5 15:09:13 2000 by pnkfelix
 2 cananian 1.1.2.2 // Copyright (C) 2000 Felix S. Klock II <pnkfelix@mit.edu>
 3 pnkfelix 1.1.2.1 // Licensed under the terms of the GNU GPL; see COPYING for details.
 4 pnkfelix 1.1.2.1 package harpoon.Util;
 5 pnkfelix 1.1.2.1 
 6 pnkfelix 1.1.2.1 /**
 7 pnkfelix 1.1.2.1  * <code>BinaryRelation</code> represents a predicate on a 2-tuple.
 8 pnkfelix 1.1.2.1  * It maps a set of pairs to a boolean.  Often
 9 pnkfelix 1.1.2.1  * <code>BinaryRelation</code>s will be constrained in terms of what
10 pnkfelix 1.1.2.1  * types of arguments they accept; take care in documenting what
11 pnkfelix 1.1.2.1  * requirements your <code>BinaryRelation</code> needs.
12 pnkfelix 1.1.2.1  * Examples of <code>BinaryRelation</code>s include 
13 pnkfelix 1.1.2.1  * "less than" ( &lt; ) and "equals" ( == ).
14 cananian 1.1.2.2  * @author  Felix S. Klock II <pnkfelix@mit.edu>
15 cananian 1.3      * @version $Id: BinaryRelation.java,v 1.3 2002/04/10 03:07:03 cananian Exp $
16 pnkfelix 1.1.2.1  */
17 cananian 1.2.2.1 public interface BinaryRelation<A,B> {
18 pnkfelix 1.1.2.1     
19 pnkfelix 1.1.2.1     /** Checks if this relation holds for a given pair.
20 pnkfelix 1.1.2.1         <BR> <B>requires:</B> (<code>a</code>, <code>b</code>) falls
21 pnkfelix 1.1.2.1              in the domain of <code>this</code>.
22 pnkfelix 1.1.2.1         <BR> <B>effects:</B> Returns <code>True</code> if this
23 pnkfelix 1.1.2.1              relation holds for (<code>a</code> , <code>b</code>).
24 pnkfelix 1.1.2.1              Else returns <code>False</code>.  
25 pnkfelix 1.1.2.1     */
26 cananian 1.2.2.1     public boolean contains(A a, B b);
27 pnkfelix 1.1.2.1     
28 cananian 1.2     }