forked from JavaTX/JavaCompilerCore
36 lines
713 B
Java
36 lines
713 B
Java
|
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(',', '|');
|
||
|
}
|
||
|
|
||
|
}
|