@Test public void testHashCode() { final FactPattern fp = new FactPattern(); fp.setFactType( "Applicant" ); fp.setBoundName( "$a" ); final SingleFieldConstraintEBLeftSide con = new SingleFieldConstraintEBLeftSide(); con.setConstraintValueType( SingleFieldConstraint.TYPE_UNDEFINED ); fp.addConstraint( con ); con.setExpressionLeftSide( new ExpressionFormLine( new ExpressionUnboundFact( fp.getFactType() ) ) ); assertNotEquals( 0, con.hashCode() ); }
@Override public int hashCode() { int result = super.hashCode(); result = ~~result; result = 31 * result + (expLeftSide != null ? expLeftSide.hashCode() : 0); result = ~~result; return result; }
SingleFieldConstraintEBLeftSide extends SingleFieldConstraint { @Override public int hashCode() { int result = super.hashCode(); result = ~~result; result = 31 * result + (expLeftSide != null ? expLeftSide.hashCode() : 0); result = ~~result; return result; } }
SingleFieldConstraintEBLeftSide extends SingleFieldConstraint { @Override public int hashCode() { int result = super.hashCode(); result = ~~result; result = 31 * result + (expLeftSide != null ? expLeftSide.hashCode() : 0); result = ~~result; return result; } SingleFieldConstraintEBLeftSide();  SingleFieldConstraintEBLeftSide( String factType,
                                            String fieldName,
                                            String fieldType,
                                            FieldConstraint parent );  SingleFieldConstraintEBLeftSide( String field ); }
SingleFieldConstraintEBLeftSide extends SingleFieldConstraint { @Override public int hashCode() { int result = super.hashCode(); result = ~~result; result = 31 * result + (expLeftSide != null ? expLeftSide.hashCode() : 0); result = ~~result; return result; } SingleFieldConstraintEBLeftSide();  SingleFieldConstraintEBLeftSide( String factType,
                                            String fieldName,
                                            String fieldType,
                                            FieldConstraint parent );  SingleFieldConstraintEBLeftSide( String field ); boolean isBound(); ExpressionFormLine getExpressionLeftSide(); void setExpressionLeftSide( ExpressionFormLine expression ); @Override String getFieldBinding(); @Override void setFieldBinding( String fieldBinding ); @Override String getFieldType(); @Override String getFieldName(); @Override void addNewConnective(); @Override boolean equals(Object o); @Override int hashCode(); }
SingleFieldConstraintEBLeftSide extends SingleFieldConstraint { @Override public int hashCode() { int result = super.hashCode(); result = ~~result; result = 31 * result + (expLeftSide != null ? expLeftSide.hashCode() : 0); result = ~~result; return result; } SingleFieldConstraintEBLeftSide();  SingleFieldConstraintEBLeftSide( String factType,
                                            String fieldName,
                                            String fieldType,
                                            FieldConstraint parent );  SingleFieldConstraintEBLeftSide( String field ); boolean isBound(); ExpressionFormLine getExpressionLeftSide(); void setExpressionLeftSide( ExpressionFormLine expression ); @Override String getFieldBinding(); @Override void setFieldBinding( String fieldBinding ); @Override String getFieldType(); @Override String getFieldName(); @Override void addNewConnective(); @Override boolean equals(Object o); @Override int hashCode();  }