equals and hashcode
一般重写equals, 需要重写hashcode。for hash Collection usage
public boolean equals(Object o){ if(o==this) return true; if(!(o instanceof CatchFinally)) return false; CatchFinally cf = (CatchFinally)o; return cf.keyfield == this.keyfield&&this.keyfield2.equals(cf.keyfield2); }
public int hashCode(){ int result =17; result = 37result + keyfield; result = 37result + keyfield2; return result; }