本文整理了Java中uk.ac.ebi.intact.model.Feature.hashCode()
方法的一些代码示例,展示了Feature.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Feature.hashCode()
方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Feature
类名称:Feature
方法名: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...
[中]记住hashCode和equals方法必须并行开发,因为:如果a.equals(b),那么a.hoshCode()==b.hashCode()。目前,功能哈希代码基于其组件。反过来说,情况并非如此。除非它在将对象存储在基于哈希的集合(如HashMap)中时会破坏一致性。。。
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion
public int hashCode() {
// we want that method to return the same result for f1-f2 tan for f2-f1
return feature1.hashCode() * feature2.hashCode();
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
@Override
public int hashCode() {
return hashCode( true, true );
}
代码示例来源:origin: uk.ac.ebi.intact.util/data-conversion
public int hashCode() {
// we want that method to return the same result for f1-f2 tan for f2-f1
return feature1.hashCode() * feature2.hashCode();
}
代码示例来源:origin: uk.ac.ebi.intact.app/data-conversion
public int hashCode() {
// we want that method to return the same result for f1-f2 tan for f2-f1
return feature1.hashCode() * feature2.hashCode();
}
代码示例来源:origin: uk.ac.ebi.intact.util/data-conversion
public int hashCode() {
// we want that method to return the same result for f1-f2 tan for f2-f1
return feature1.hashCode() * feature2.hashCode();
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
@Override
public int hashCode() {
return hashCode( true, true );
}
代码示例来源:origin: uk.ac.ebi.intact.app/data-conversion
public int hashCode() {
// we want that method to return the same result for f1-f2 tan for f2-f1
return feature1.hashCode() * feature2.hashCode();
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion
public int hashCode() {
// we want that method to return the same result for f1-f2 tan for f2-f1
return feature1.hashCode() * feature2.hashCode();
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
@Override
public int hashCode() {
int result = fromIntervalStart;
result = 31 * result + fromIntervalEnd;
result = 31 * result + toIntervalStart;
result = 31 * result + toIntervalEnd;
result = 31 * result + ( undetermined ? 1 : 0 );
result = 31 * result + ( linked ? 1 : 0 );
result = 31 * result + ( fromCvFuzzyType != null ? fromCvFuzzyType.hashCode() : 0 );
result = 31 * result + ( toCvFuzzyType != null ? toCvFuzzyType.hashCode() : 0 );
result = 31 * result + ( sequence != null ? sequence.hashCode() : 0 );
result = 31 * result + ( fullSequence != null ? fullSequence.hashCode() : 0 );
result = 31 * result + ( upStreamSequence != null ? upStreamSequence.hashCode() : 0 );
result = 31 * result + ( downStreamSequence != null ? downStreamSequence.hashCode() : 0 );
// Include the feature this range is linked to.
result = 31 * result + ( feature != null ? feature.getAc() != null? feature.getAc().hashCode() : feature.hashCode( true, false ) : 0 );
return result;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
@Override
public int hashCode() {
int result = fromIntervalStart;
result = 31 * result + fromIntervalEnd;
result = 31 * result + toIntervalStart;
result = 31 * result + toIntervalEnd;
result = 31 * result + ( undetermined ? 1 : 0 );
result = 31 * result + ( linked ? 1 : 0 );
result = 31 * result + ( fromCvFuzzyType != null ? fromCvFuzzyType.hashCode() : 0 );
result = 31 * result + ( toCvFuzzyType != null ? toCvFuzzyType.hashCode() : 0 );
result = 31 * result + ( sequence != null ? sequence.hashCode() : 0 );
result = 31 * result + ( fullSequence != null ? fullSequence.hashCode() : 0 );
result = 31 * result + ( upStreamSequence != null ? upStreamSequence.hashCode() : 0 );
result = 31 * result + ( downStreamSequence != null ? downStreamSequence.hashCode() : 0 );
// Include the feature this range is linked to.
result = 31 * result + ( feature != null ? feature.getAc() != null? feature.getAc().hashCode() : feature.hashCode( true, false ) : 0 );
return result;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
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;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
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;
}
内容来源于网络,如有侵权,请联系作者删除!