Search in sources :

Example 66 with HashCodeBuilder

use of org.apache.commons.lang3.builder.HashCodeBuilder in project knime-core by knime.

the class FilterModelRange method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder b = new HashCodeBuilder();
    b.appendSuper(super.hashCode()).append(m_minimum).append(m_maximum);
    b.append(m_maximumInclusive).append(m_maximumInclusive);
    return b.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang3.builder.HashCodeBuilder)

Example 67 with HashCodeBuilder

use of org.apache.commons.lang3.builder.HashCodeBuilder in project knime-core by knime.

the class VirtualSubNodeExchange method hashCode.

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
    HashCodeBuilder b = new HashCodeBuilder();
    b.append(m_portSpecs).append(m_portObjects).append(m_flowVariables);
    return b.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang3.builder.HashCodeBuilder)

Example 68 with HashCodeBuilder

use of org.apache.commons.lang3.builder.HashCodeBuilder in project xwiki-platform by xwiki.

the class WikiProvisioningJobRequest method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(getId());
    builder.append(getWikiId()).append(getProvisioningJobParameter());
    return builder.hashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang3.builder.HashCodeBuilder)

Example 69 with HashCodeBuilder

use of org.apache.commons.lang3.builder.HashCodeBuilder in project xwiki-platform by xwiki.

the class AbstractNotificationPreference method hashCode.

@Override
public int hashCode() {
    // Here, we only compute a subset of the properties, because we want to have the same hashcode if the other
    // preference is about the same event type, etc...
    HashCodeBuilder hashCodeBuilder = new HashCodeBuilder();
    hashCodeBuilder.append(format);
    hashCodeBuilder.append(properties);
    return hashCodeBuilder.hashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang3.builder.HashCodeBuilder)

Example 70 with HashCodeBuilder

use of org.apache.commons.lang3.builder.HashCodeBuilder in project ANNIS by korpling.

the class TestDataObject method hashCodeB.

@Test
public void hashCodeB() {
    B b = new B(S1, C1);
    // order of the field values is important, fields are sorted by name
    // first comes i=I1, then comes s=S1
    int expected = new HashCodeBuilder().append(C1).append(S1).toHashCode();
    assertThat(b.hashCode(), is(expected));
}
Also used : HashCodeBuilder(org.apache.commons.lang3.builder.HashCodeBuilder) Test(org.junit.Test)

Aggregations

HashCodeBuilder (org.apache.commons.lang3.builder.HashCodeBuilder)70 IOException (java.io.IOException)1 KeyManagementException (java.security.KeyManagementException)1 KeyStoreException (java.security.KeyStoreException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 CertificateException (java.security.cert.CertificateException)1 X509Certificate (java.security.cert.X509Certificate)1 TreeMap (java.util.TreeMap)1 Test (org.junit.Test)1