JavaPatternMatching/src/typinferenz/UndConstraint.java

36 lines
713 B
Java
Raw Normal View History

2013-10-18 11:33:46 +00:00
package typinferenz;
import java.util.Vector;
import mycompiler.mytype.Pair;
import mycompiler.mytype.Type;
/**
* Stellt ein Constraint dar, welches aus mehreren Constraint-Paaren besteht. Diese gelten alle stets gleichzeitig / sind per "Und" miteinander verknüpft.
* @author janulrich
*
*/
public class UndConstraint extends OderConstraint {
public UndConstraint(Type p1, Type p2) {
super(p1, p2);
}
public UndConstraint() {
super();
}
@Override
public Vector<UndConstraint> getUndConstraints() {
Vector<UndConstraint> ret = new Vector<UndConstraint>();
ret.add(this);
return ret;
}
public String toString(){
String ret = super.toString();
return ret.replace(',', '|');
}
}