@Override public int hashCode() { return 29 * super.hashCode(); } }
public int hashCode() { return 31*super.hashCode(); }
public int hashCode() { return 31*super.hashCode(); }
/** * Remember that hashCode and equals methods has to be develop in parallel * since : if a.equals(b) then a.hoshCode() == b.hashCode(). Currently the Feature * hashcode is based on its Component. * The other way round is NOT true. * Unless it could break consistancy when storing object in a hash-based * collection such as HashMap... */ @Override public int hashCode() { int code = super.hashCode(); if ( component != null ) { code = code * 29 + component.hashCode(); } //Q: should we use any Ranges also in computing the hashcode? return code; }
/** * This class overwrites equals. To ensure proper functioning of HashTable, hashCode must be overwritten, too. * * @return hash code of the object. */ @Override public int hashCode() { int result = super.hashCode(); //need check as we still have no-arg constructor... if ( identifier != null ) { result = 29 * result + identifier.hashCode(); } else { result = 29 * result + ( ( getShortLabel() == null ) ? 31 : getShortLabel().hashCode() ); } return result; }
/** * This class overwrites equals. To ensure proper functioning of HashTable, hashCode must be overwritten, too. * * @return hash code of the object. */ @Override public int hashCode() { int result = super.hashCode(); //need check as we still have no-arg constructor... if ( identifier != null ) { result = 29 * result + identifier.hashCode(); } else { result = 29 * result + ( ( getShortLabel() == null ) ? 31 : getShortLabel().hashCode() ); } return result; }
@Override public int hashCode() { int result = super.hashCode(); result = 29 * result + ( bioSource != null ? bioSource.hashCode() : 0 ); result = 29 * result + ( interactorType != null ? interactorType.hashCode() : 0 ); // next line is commented because is making hibernate (cglib) fail from time to time //result = 29 * result + ( activeInstances != null ? activeInstances.size() : 0 ); return result; }
@Override public int hashCode() { int result = super.hashCode(); result = 29 * result + bioSource.hashCode(); result = 29 * result + ( publication != null ? publication.hashCode() : 0 ); return result; }
/** * This class overwrites equals. To ensure proper functioning of HashTable, hashCode must be overwritten, too. * * @return hash code of the object. */ @Override public int hashCode() { int result = super.hashCode(); Xref idXref = CvObjectUtils.getPsiMiIdentityXref( this ); //need check as we still have no-arg constructor... if ( idXref != null ) { result = 29 * result + idXref.getPrimaryId().hashCode(); } else { result = 29 * result + ( ( getShortLabel() == null ) ? 31 : getShortLabel().hashCode() ); } return result; }
public int hashCode( boolean includeBinds, boolean includeRanges ) { int result = super.hashCode(); if( includeRanges ) { result = 31 * result + HashCodeUtils.collectionHashCode( ranges ); } result = 31 * result + ( cvFeatureIdentification != null ? cvFeatureIdentification.hashCode() : 0 ); result = 31 * result + ( cvFeatureType != null ? cvFeatureType.hashCode() : 0 ); // hashcode component without including features result = 31 * result + ( component != null ? component.getAc() != null? component.getAc().hashCode() : component.hashCode( false ) : 0 ); // make sure we don't end up in an infinite loop checking on linked features if( includeBinds ) { result = 31 * result + ( binds != null ? binds.hashCode( false, false ) : 0 ); } return result; }
public int hashCode( boolean includeBinds, boolean includeRanges ) { int result = super.hashCode(); if( includeRanges ) { result = 31 * result + HashCodeUtils.collectionHashCode( ranges ); } result = 31 * result + ( cvFeatureIdentification != null ? cvFeatureIdentification.hashCode() : 0 ); result = 31 * result + ( cvFeatureType != null ? cvFeatureType.hashCode() : 0 ); // hashcode component without including features result = 31 * result + ( component != null ? component.getAc() != null? component.getAc().hashCode() : component.hashCode( false ) : 0 ); // make sure we don't end up in an infinite loop checking on linked features if( includeBinds ) { result = 31 * result + ( binds != null ? binds.hashCode( false, false ) : 0 ); } return result; }
public int hashCode( boolean includeFeatures ) { int result = super.hashCode();
public int hashCode( boolean includeFeatures ) { int result = super.hashCode();