public boolean equals(Object obj) {if (obj instanceof StatePair) {StatePair p = (StatePair) obj;return p.s1 == s1 && p.s2 == s2;} else return false;}
public override bool Equals(object obj){if (obj is StatePair){StatePair p = (StatePair)obj;return p.S1 == S1 && p.S2 == S2;}else{return false;}}