Opus5
Interface Partition

All Superinterfaces:
Comparable, Container, SearchableContainer, Set
All Known Implementing Classes:
PartitionAsForest

public interface Partition
extends Set

Encapsulates methods common to all partitions.

Version:
$Id: Partition.java,v 3.1 1998/07/28 01:32:17 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.

Field Summary
static java.lang.String copyright
           
 
Method Summary
 Set find(int item)
          Returns the element of this partition that contains the specified item.
 void join(Set set1, Set set2)
          Joins two specified elements of this parition.
 
Methods inherited from interface Opus5.Set
difference, intersection, isEQ, isSubset, union
 
Methods inherited from interface Opus5.SearchableContainer
find, insert, isMember, withdraw
 
Methods inherited from interface Opus5.Container
accept, getCount, getEnumeration, isEmpty, isFull, purge
 
Methods inherited from interface Opus5.Comparable
compare, isEQ, isGE, isGT, isLE, isLT, isNE
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

find

public Set find(int item)
Returns the element of this partition that contains the specified item. The elements of a partition are sets. Thus, this method finds the set in this partition that contains the given item.
Parameters:
item - The number of the item to find.
Returns:
The element of this partition that contains the item.
See Also:
Set

join

public void join(Set set1,
                 Set set2)
Joins two specified elements of this parition. The elements of a partition are sets. The arguments must be distinct elements of this partition. The specified sets are removed from the parition and replaced by the union of those sets.
Parameters:
set1 - An element of this partition.
set2 - An element of this partition.
See Also:
Set