harpoon.Util
Interface BinaryRelation

All Known Subinterfaces:
InvertibleMultiMap, MultiMap
All Known Implementing Classes:
GenericInvertibleMultiMap, GenericMultiMap, UnmodifiableMultiMap

public interface BinaryRelation

BinaryRelation represents a predicate on a 2-tuple. It maps a set of pairs to a boolean. Often BinaryRelations will be constrained in terms of what types of arguments they accept; take care in documenting what requirements your BinaryRelation needs. Examples of BinaryRelations include "less than" ( < ) and "equals" ( == ).

Version:
$Id: BinaryRelation.java,v 1.2 2002/02/25 21:08:45 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Method Summary
 boolean contains(Object a, Object b)
          Checks if this relation holds for a given pair.
 

Method Detail

contains

public boolean contains(Object a,
                        Object 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.