harpoon.Util
Interface BinaryRelation<A,B>
public interface BinaryRelation<A,B>
BinaryRelation
represents a predicate on a 2-tuple.
It maps a set of pairs to a boolean. Often
BinaryRelation
s will be constrained in terms of what
types of arguments they accept; take care in documenting what
requirements your BinaryRelation
needs.
Examples of BinaryRelation
s include
"less than" ( < ) and "equals" ( == ).
- Version:
- $Id: BinaryRelation.java,v 1.3 2002/04/10 03:07:03 cananian Exp $
- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
Method Summary |
boolean |
contains(A a,
B b)
Checks if this relation holds for a given pair. |
contains
boolean contains(A a,
B b)
- Checks if this relation holds for a given pair.
requires: (a
, b
) falls
in the domain of this
.
effects: Returns True
if this
relation holds for (a
, b
).
Else returns False
.