@Test public void testEquals4() { MatchCriteria c1 = example("abc"); MatchCriteria c2 = example("abc", '#'); assertTrue("Different match criteria compare as equal: " + c1 + ", " + c2, ! c1.equals(c2)); }
public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof MatchCriteria)) { return false; } MatchCriteria mc = (MatchCriteria)obj; if (isNegated() != mc.isNegated()) { return false; } if (this.mode != mc.mode) { return false; } return getEscapeChar() == mc.getEscapeChar() && EquivalenceUtil.areEqual(getLeftExpression(), mc.getLeftExpression()) && EquivalenceUtil.areEqual(getRightExpression(), mc.getRightExpression()); }
MatchCriteria extends PredicateCriteria implements Negatable { public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof MatchCriteria)) { return false; } MatchCriteria mc = (MatchCriteria)obj; if (isNegated() != mc.isNegated()) { return false; } if (this.mode != mc.mode) { return false; } return getEscapeChar() == mc.getEscapeChar() && EquivalenceUtil.areEqual(getLeftExpression(), mc.getLeftExpression()) && EquivalenceUtil.areEqual(getRightExpression(), mc.getRightExpression()); } }
MatchCriteria extends PredicateCriteria implements Negatable { public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof MatchCriteria)) { return false; } MatchCriteria mc = (MatchCriteria)obj; if (isNegated() != mc.isNegated()) { return false; } if (this.mode != mc.mode) { return false; } return getEscapeChar() == mc.getEscapeChar() && EquivalenceUtil.areEqual(getLeftExpression(), mc.getLeftExpression()) && EquivalenceUtil.areEqual(getRightExpression(), mc.getRightExpression()); } MatchCriteria();  MatchCriteria( Expression leftExpression, Expression rightExpression );  MatchCriteria( Expression leftExpression, Expression rightExpression, char escapeChar ); }
MatchCriteria extends PredicateCriteria implements Negatable { public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof MatchCriteria)) { return false; } MatchCriteria mc = (MatchCriteria)obj; if (isNegated() != mc.isNegated()) { return false; } if (this.mode != mc.mode) { return false; } return getEscapeChar() == mc.getEscapeChar() && EquivalenceUtil.areEqual(getLeftExpression(), mc.getLeftExpression()) && EquivalenceUtil.areEqual(getRightExpression(), mc.getRightExpression()); } MatchCriteria();  MatchCriteria( Expression leftExpression, Expression rightExpression );  MatchCriteria( Expression leftExpression, Expression rightExpression, char escapeChar ); void setLeftExpression(Expression expression); Expression getLeftExpression(); void setRightExpression(Expression expression); Expression getRightExpression(); char getEscapeChar(); void setEscapeChar(char escapeChar); boolean isNegated(); void setNegated(boolean negationFlag); @Override void negate(); void acceptVisitor(LanguageVisitor visitor); int hashCode(); boolean equals(Object obj); Object clone(); static Pattern getPattern(String newPattern, String originalPattern, int flags); MatchMode getMode(); void setMode(MatchMode mode); }
MatchCriteria extends PredicateCriteria implements Negatable { public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof MatchCriteria)) { return false; } MatchCriteria mc = (MatchCriteria)obj; if (isNegated() != mc.isNegated()) { return false; } if (this.mode != mc.mode) { return false; } return getEscapeChar() == mc.getEscapeChar() && EquivalenceUtil.areEqual(getLeftExpression(), mc.getLeftExpression()) && EquivalenceUtil.areEqual(getRightExpression(), mc.getRightExpression()); } MatchCriteria();  MatchCriteria( Expression leftExpression, Expression rightExpression );  MatchCriteria( Expression leftExpression, Expression rightExpression, char escapeChar ); void setLeftExpression(Expression expression); Expression getLeftExpression(); void setRightExpression(Expression expression); Expression getRightExpression(); char getEscapeChar(); void setEscapeChar(char escapeChar); boolean isNegated(); void setNegated(boolean negationFlag); @Override void negate(); void acceptVisitor(LanguageVisitor visitor); int hashCode(); boolean equals(Object obj); Object clone(); static Pattern getPattern(String newPattern, String originalPattern, int flags); MatchMode getMode(); void setMode(MatchMode mode); static final char WILDCARD_CHAR; static final char MATCH_CHAR; static final char NULL_ESCAPE_CHAR; }