edu.toronto.cs.algebra
Class MinUpSet

java.lang.Object
  extended by edu.toronto.cs.algebra.MinUpSet

public class MinUpSet
extends java.lang.Object

an upset represented by its minimal elements

Version:
1.0
Author:
Arie Gurfinkel

Constructor Summary
MinUpSet()
          Creates a new MinUpSet instance.
 
Method Summary
 boolean add(AlgebraValue v)
          Adds a single AlgebraValue
 void addAll(MinUpSet set)
          Adds all elements of set to this set
 boolean equals(java.lang.Object o)
          Equals method
 java.util.Set getValues()
          Returns the set of values
 int hashCode()
           
 boolean isIn(AlgebraValue v)
          true if v is an element of this set, i.e.
 boolean isSubSet(MinUpSet set)
          true if every element of set is an element of this set.
 java.util.Iterator iterator()
          Iterator over values of this set.
 int size()
          Describe size method here.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MinUpSet

public MinUpSet()
Creates a new MinUpSet instance.

Method Detail

addAll

public void addAll(MinUpSet set)
Adds all elements of set to this set

Parameters:
set - a MinUpSet value

add

public boolean add(AlgebraValue v)
Adds a single AlgebraValue

Parameters:
v - an AlgebraValue value
Returns:
true if v was actually inserted

isIn

public boolean isIn(AlgebraValue v)
true if v is an element of this set, i.e. it is in its cover

Parameters:
v - an AlgebraValue value
Returns:
a boolean value

isSubSet

public boolean isSubSet(MinUpSet set)
true if every element of set is an element of this set.

Parameters:
set - a MinUpSet value
Returns:
a boolean value

getValues

public java.util.Set getValues()
Returns the set of values

Returns:
a Set value

iterator

public java.util.Iterator iterator()
Iterator over values of this set.

Returns:
an Iterator value

size

public int size()
Describe size method here.

Returns:
an int value

equals

public boolean equals(java.lang.Object o)
Equals method

Overrides:
equals in class java.lang.Object
Parameters:
o - an Object value
Returns:
a boolean value

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object