com.veromodo.tempo.sem
Class SetOfType

java.lang.Object
  extended by com.veromodo.tempo.sem.SetOfType
All Implemented Interfaces:
java.lang.Iterable<Type>

public class SetOfType
extends java.lang.Object
implements java.lang.Iterable<Type>


Constructor Summary
SetOfType()
           
SetOfType(java.lang.Iterable<Type> ts)
           
SetOfType(Type t)
           
 
Method Summary
 SetOfType add(Type t)
           
 void add(Type t, int d)
           
 void addAll(java.util.Collection<Type> c)
           
 SetOfType addAll(SetOfType st)
           
 boolean contains(SetOfType t)
           
 boolean contains(Type t)
           
 boolean containsExactly(Type t)
           
 boolean equals(java.lang.Object o)
           
 java.lang.Integer getDistance(Type t)
           
 Type getSingleton()
           
 java.util.Collection<Type> getTypes()
           
 boolean givenTypeAccepts(Type t)
           
 SetOfType intersect(SetOfType s)
           
 boolean isEmpty()
           
 boolean isErrorType()
           
 boolean isSingleton()
           
 java.util.Iterator<Type> iterator()
           
 SetOfType lub(SetOfType s)
          Computes the set of least upper bounds lub(x,y) for all pairs of type (x,y) drawn from (this,s)
 java.lang.String prettyPrint()
           
 SetOfType projectOn(java.lang.String with)
           
 void remove(Type t)
           
 int size()
           
 java.lang.String toString()
           
 SetOfType union(SetOfType s)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetOfType

public SetOfType()

SetOfType

public SetOfType(Type t)

SetOfType

public SetOfType(java.lang.Iterable<Type> ts)
Method Detail

add

public SetOfType add(Type t)

add

public void add(Type t,
                int d)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getDistance

public java.lang.Integer getDistance(Type t)

remove

public void remove(Type t)

contains

public boolean contains(SetOfType t)

contains

public boolean contains(Type t)

containsExactly

public boolean containsExactly(Type t)

givenTypeAccepts

public boolean givenTypeAccepts(Type t)

iterator

public java.util.Iterator<Type> iterator()
Specified by:
iterator in interface java.lang.Iterable<Type>

isEmpty

public boolean isEmpty()

isSingleton

public boolean isSingleton()

getSingleton

public Type getSingleton()

addAll

public void addAll(java.util.Collection<Type> c)

addAll

public SetOfType addAll(SetOfType st)

getTypes

public java.util.Collection<Type> getTypes()

isErrorType

public boolean isErrorType()

size

public int size()

union

public SetOfType union(SetOfType s)

lub

public SetOfType lub(SetOfType s)
Computes the set of least upper bounds lub(x,y) for all pairs of type (x,y) drawn from (this,s)

Parameters:
s - The second set of types
Returns:
The set of lubs.

intersect

public SetOfType intersect(SetOfType s)

toString

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

prettyPrint

public java.lang.String prettyPrint()

projectOn

public SetOfType projectOn(java.lang.String with)