@Test public void testEquals() { assertThat( group.equals( group ), is( equalTo( true ) ) ); assertThat( group.equals( mock( GroupDataBody.class ) ), is( equalTo( false ) ) ); RelationalGroup nextGroup = new RelationalGroup(); assertThat( group.equals( nextGroup ), is( equalTo( true ) ) ); nextGroup.addField( "test_field" ); assertThat( group.equals( nextGroup ), is( equalTo( false ) ) ); }
public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !( obj instanceof RelationalGroup ) ) { return false; } final RelationalGroup group = (RelationalGroup) obj; final String[] otherFields = group.getFieldsArray(); final String[] myFields = getFieldsArray(); if ( ObjectUtilities.equalArray( otherFields, myFields ) == false ) { return false; } return true; }
RelationalGroup extends Group { public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !( obj instanceof RelationalGroup ) ) { return false; } final RelationalGroup group = (RelationalGroup) obj; final String[] otherFields = group.getFieldsArray(); final String[] myFields = getFieldsArray(); if ( ObjectUtilities.equalArray( otherFields, myFields ) == false ) { return false; } return true; } }
RelationalGroup extends Group { public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !( obj instanceof RelationalGroup ) ) { return false; } final RelationalGroup group = (RelationalGroup) obj; final String[] otherFields = group.getFieldsArray(); final String[] myFields = getFieldsArray(); if ( ObjectUtilities.equalArray( otherFields, myFields ) == false ) { return false; } return true; } RelationalGroup(); }
RelationalGroup extends Group { public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !( obj instanceof RelationalGroup ) ) { return false; } final RelationalGroup group = (RelationalGroup) obj; final String[] otherFields = group.getFieldsArray(); final String[] myFields = getFieldsArray(); if ( ObjectUtilities.equalArray( otherFields, myFields ) == false ) { return false; } return true; } RelationalGroup(); GroupHeader getHeader(); void setHeader( final GroupHeader header ); GroupFooter getFooter(); void setFooter( final GroupFooter footer ); void setFields( final List<String> c ); void clearFields(); int getElementCount(); void addField( final String name ); List<String> getFields(); void setFieldsArray( final String[] fields ); String[] getFieldsArray(); String toString(); void setBody( final GroupBody body ); boolean equals( final Object obj ); int hashCode(); boolean isGroupChange( final DataRow dataRow ); @Deprecated GroupDataBody findGroupDataBody(); RelationalGroup clone(); RelationalGroup derive( final boolean preserveElementInstanceIds ); Element getElement( final int index ); void setElementAt( final int index, final Element element ); List<SortConstraint> getSortingConstraint(); }
RelationalGroup extends Group { public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !( obj instanceof RelationalGroup ) ) { return false; } final RelationalGroup group = (RelationalGroup) obj; final String[] otherFields = group.getFieldsArray(); final String[] myFields = getFieldsArray(); if ( ObjectUtilities.equalArray( otherFields, myFields ) == false ) { return false; } return true; } RelationalGroup(); GroupHeader getHeader(); void setHeader( final GroupHeader header ); GroupFooter getFooter(); void setFooter( final GroupFooter footer ); void setFields( final List<String> c ); void clearFields(); int getElementCount(); void addField( final String name ); List<String> getFields(); void setFieldsArray( final String[] fields ); String[] getFieldsArray(); String toString(); void setBody( final GroupBody body ); boolean equals( final Object obj ); int hashCode(); boolean isGroupChange( final DataRow dataRow ); @Deprecated GroupDataBody findGroupDataBody(); RelationalGroup clone(); RelationalGroup derive( final boolean preserveElementInstanceIds ); Element getElement( final int index ); void setElementAt( final int index, final Element element ); List<SortConstraint> getSortingConstraint();  }