1 package edu.uci.eecs.specCompiler.specExtraction;
3 public class ConditionalInterface {
4 public final String interfaceName;
5 public final String hbConditionLabel;
7 public ConditionalInterface(String interfaceName, String hbConditionLabel) {
8 this.interfaceName = interfaceName;
9 this.hbConditionLabel = hbConditionLabel;
12 public boolean equals(Object other) {
13 if (!(other instanceof ConditionalInterface))
15 ConditionalInterface another = (ConditionalInterface) other;
16 return another.interfaceName.equals(interfaceName)
17 && (another.hbConditionLabel.equals(hbConditionLabel) || another.hbConditionLabel
21 public int hashCode() {
22 return interfaceName.hashCode() << 5 ^ hbConditionLabel.hashCode();
25 public String toString() {
26 if (hbConditionLabel.equals(""))
27 return interfaceName + "(true)";
29 return interfaceName + "(" + hbConditionLabel + ")";