@Test public void testHashCodeSymmetric() throws Exception { assertEquals( objectClassA.hashCode(), objectClassACopy.hashCode() ); assertEquals( objectClassACopy.hashCode(), objectClassA.hashCode() ); }
@Override public int hashCode() { int hash = h; hash = hash * 17 + objectClassType.getValue(); int tempHash = 0; for ( String oid : superiorOids ) { tempHash += oid.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String may : mayAttributeTypeOids ) { tempHash += may.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String must : mustAttributeTypeOids ) { tempHash += must.hashCode(); } hash = hash * 17 + tempHash; return hash; }
ObjectClass extends AbstractSchemaObject { @Override public int hashCode() { int hash = h; hash = hash * 17 + objectClassType.getValue(); int tempHash = 0; for ( String oid : superiorOids ) { tempHash += oid.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String may : mayAttributeTypeOids ) { tempHash += may.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String must : mustAttributeTypeOids ) { tempHash += must.hashCode(); } hash = hash * 17 + tempHash; return hash; } }
ObjectClass extends AbstractSchemaObject { @Override public int hashCode() { int hash = h; hash = hash * 17 + objectClassType.getValue(); int tempHash = 0; for ( String oid : superiorOids ) { tempHash += oid.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String may : mayAttributeTypeOids ) { tempHash += may.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String must : mustAttributeTypeOids ) { tempHash += must.hashCode(); } hash = hash * 17 + tempHash; return hash; } ObjectClass( String oid ); }
ObjectClass extends AbstractSchemaObject { @Override public int hashCode() { int hash = h; hash = hash * 17 + objectClassType.getValue(); int tempHash = 0; for ( String oid : superiorOids ) { tempHash += oid.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String may : mayAttributeTypeOids ) { tempHash += may.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String must : mustAttributeTypeOids ) { tempHash += must.hashCode(); } hash = hash * 17 + tempHash; return hash; } ObjectClass( String oid ); List<String> getMayAttributeTypeOids(); List<AttributeType> getMayAttributeTypes(); void addMayAttributeTypeOids( String... oids ); void addMayAttributeTypes( AttributeType... attributeTypes ); void setMayAttributeTypeOids( List<String> mayAttributeTypeOids ); void setMayAttributeTypes( List<AttributeType> mayAttributeTypes ); List<String> getMustAttributeTypeOids(); List<AttributeType> getMustAttributeTypes(); void addMustAttributeTypeOids( String... oids ); void addMustAttributeTypes( AttributeType... attributeTypes ); void setMustAttributeTypeOids( List<String> mustAttributeTypeOids ); void setMustAttributeTypes( List<AttributeType> mustAttributeTypes ); List<ObjectClass> getSuperiors(); List<String> getSuperiorOids(); void addSuperiorOids( String... oids ); void addSuperior( ObjectClass... objectClasses ); void setSuperiors( List<ObjectClass> superiors ); void setSuperiorOids( List<String> superiorOids ); ObjectClassTypeEnum getType(); void setType( ObjectClassTypeEnum objectClassType ); boolean isStructural(); boolean isAbstract(); boolean isAuxiliary(); @Override String toString(); @Override ObjectClass copy(); @Override int hashCode(); @Override boolean equals( Object o ); @Override void clear(); }
ObjectClass extends AbstractSchemaObject { @Override public int hashCode() { int hash = h; hash = hash * 17 + objectClassType.getValue(); int tempHash = 0; for ( String oid : superiorOids ) { tempHash += oid.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String may : mayAttributeTypeOids ) { tempHash += may.hashCode(); } hash = hash * 17 + tempHash; tempHash = 0; for ( String must : mustAttributeTypeOids ) { tempHash += must.hashCode(); } hash = hash * 17 + tempHash; return hash; } ObjectClass( String oid ); List<String> getMayAttributeTypeOids(); List<AttributeType> getMayAttributeTypes(); void addMayAttributeTypeOids( String... oids ); void addMayAttributeTypes( AttributeType... attributeTypes ); void setMayAttributeTypeOids( List<String> mayAttributeTypeOids ); void setMayAttributeTypes( List<AttributeType> mayAttributeTypes ); List<String> getMustAttributeTypeOids(); List<AttributeType> getMustAttributeTypes(); void addMustAttributeTypeOids( String... oids ); void addMustAttributeTypes( AttributeType... attributeTypes ); void setMustAttributeTypeOids( List<String> mustAttributeTypeOids ); void setMustAttributeTypes( List<AttributeType> mustAttributeTypes ); List<ObjectClass> getSuperiors(); List<String> getSuperiorOids(); void addSuperiorOids( String... oids ); void addSuperior( ObjectClass... objectClasses ); void setSuperiors( List<ObjectClass> superiors ); void setSuperiorOids( List<String> superiorOids ); ObjectClassTypeEnum getType(); void setType( ObjectClassTypeEnum objectClassType ); boolean isStructural(); boolean isAbstract(); boolean isAuxiliary(); @Override String toString(); @Override ObjectClass copy(); @Override int hashCode(); @Override boolean equals( Object o ); @Override void clear(); static final long serialVersionUID; }