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(ConditionalInterface other) {
13 if (!(other instanceof ConditionalInterface))
15 ConditionalInterface another = (ConditionalInterface) other;
16 return another.interfaceName.equals(interfaceName) &&
17 another.hbConditionLabel.equals(hbConditionLabel);
20 public int hashCode() {
21 return interfaceName.hashCode() << 5 ^ hbConditionLabel.hashCode();
24 public String toString() {
25 if (hbConditionLabel.equals(""))
26 return interfaceName + "(true)";
28 return interfaceName + "(" + hbConditionLabel + ")";