jwutil.collections
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 1934 2004-09-27 22:42:35Z joewhaley $
- Author:
- Felix S. Klock II
|
Method Summary |
boolean |
contains(java.lang.Object a,
java.lang.Object b)
Checks if this relation holds for a given pair. |
contains
boolean contains(java.lang.Object a,
java.lang.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.
Copyright © 2004-2008 SUIF Compiler Group. All Rights Reserved.