jpaul.Constraints.SetConstraints
Class SetConstraints<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList<Constraint<SVar<T>,java.util.Set<T>>>
                  extended by jpaul.Constraints.SetConstraints.SetConstraints<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Constraint<SVar<T>,java.util.Set<T>>>, java.util.Collection<Constraint<SVar<T>,java.util.Set<T>>>, java.util.List<Constraint<SVar<T>,java.util.Set<T>>>, java.util.Queue<Constraint<SVar<T>,java.util.Set<T>>>

public class SetConstraints<T>
extends java.util.LinkedList<Constraint<SVar<T>,java.util.Set<T>>>

SetConstraints is a collection of set constraints. It contains methods to quickly add simple constraints.

Version:
$Id: SetConstraints.java,v 1.8 2006/01/29 16:05:29 adam_kiezun Exp $
Author:
Alexandru Salcianu - salcianu@alum.mit.edu
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SetConstraints()
           
 
Method Summary
 void addCtSource(java.util.Collection<T> ct, SVar<T> s)
          Adds an constraint of the form "constant set ct is included in the set s".
 void addEquality(SVar<T> s1, SVar<T> s2)
          Adds two mutual inclusion constraints to reflect the fact that the sets s1 and s2 should be equal.
 void addInclusion(SVar<T> s1, SVar<T> s2)
          Adds an inclusion constraints between two sets.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

SetConstraints

public SetConstraints()
Method Detail

addInclusion

public void addInclusion(SVar<T> s1,
                         SVar<T> s2)
Adds an inclusion constraints between two sets.


addCtSource

public void addCtSource(java.util.Collection<T> ct,
                        SVar<T> s)
Adds an constraint of the form "constant set ct is included in the set s".


addEquality

public void addEquality(SVar<T> s1,
                        SVar<T> s2)
Adds two mutual inclusion constraints to reflect the fact that the sets s1 and s2 should be equal.



Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu