@Test public void testCloneEquivalence(){ MatchCriteria c1 = example("abc"); MatchCriteria c2 = (MatchCriteria)c1.clone(); int equals = 0; UnitTestUtil.helpTestEquivalence(equals, c1, c2); }
public Object clone() { Expression leftCopy = null; if(getLeftExpression() != null) { leftCopy = (Expression) getLeftExpression().clone(); } Expression rightCopy = null; if(getRightExpression() != null) { rightCopy = (Expression) getRightExpression().clone(); } MatchCriteria criteriaCopy = new MatchCriteria(leftCopy, rightCopy, getEscapeChar()); criteriaCopy.setNegated(isNegated()); criteriaCopy.mode = mode; return criteriaCopy; }
MatchCriteria extends PredicateCriteria implements Negatable { public Object clone() { Expression leftCopy = null; if(getLeftExpression() != null) { leftCopy = (Expression) getLeftExpression().clone(); } Expression rightCopy = null; if(getRightExpression() != null) { rightCopy = (Expression) getRightExpression().clone(); } MatchCriteria criteriaCopy = new MatchCriteria(leftCopy, rightCopy, getEscapeChar()); criteriaCopy.setNegated(isNegated()); criteriaCopy.mode = mode; return criteriaCopy; } }
MatchCriteria extends PredicateCriteria implements Negatable { public Object clone() { Expression leftCopy = null; if(getLeftExpression() != null) { leftCopy = (Expression) getLeftExpression().clone(); } Expression rightCopy = null; if(getRightExpression() != null) { rightCopy = (Expression) getRightExpression().clone(); } MatchCriteria criteriaCopy = new MatchCriteria(leftCopy, rightCopy, getEscapeChar()); criteriaCopy.setNegated(isNegated()); criteriaCopy.mode = mode; return criteriaCopy; } MatchCriteria();  MatchCriteria( Expression leftExpression, Expression rightExpression );  MatchCriteria( Expression leftExpression, Expression rightExpression, char escapeChar ); }
MatchCriteria extends PredicateCriteria implements Negatable { public Object clone() { Expression leftCopy = null; if(getLeftExpression() != null) { leftCopy = (Expression) getLeftExpression().clone(); } Expression rightCopy = null; if(getRightExpression() != null) { rightCopy = (Expression) getRightExpression().clone(); } MatchCriteria criteriaCopy = new MatchCriteria(leftCopy, rightCopy, getEscapeChar()); criteriaCopy.setNegated(isNegated()); criteriaCopy.mode = mode; return criteriaCopy; } 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 Object clone() { Expression leftCopy = null; if(getLeftExpression() != null) { leftCopy = (Expression) getLeftExpression().clone(); } Expression rightCopy = null; if(getRightExpression() != null) { rightCopy = (Expression) getRightExpression().clone(); } MatchCriteria criteriaCopy = new MatchCriteria(leftCopy, rightCopy, getEscapeChar()); criteriaCopy.setNegated(isNegated()); criteriaCopy.mode = mode; return criteriaCopy; } 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; }