Example usage for org.apache.commons.lang.builder HashCodeBuilder append

List of usage examples for org.apache.commons.lang.builder HashCodeBuilder append

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder HashCodeBuilder append.

Prototype

public HashCodeBuilder append(short[] array) 

Source Link

Document

Append a hashCode for a short array.

Usage

From source file:de.tarent.maven.plugins.pkg.map.Entry.java

public int hashCode() {
    HashCodeBuilder hb = new HashCodeBuilder();
    hb.append(artifactSpec)
            // Workaround for Java5 compatibility:
            // On JDK5 the hashcode for two VersionRange instances
            // that have the same restriction (e.g. "[3.0,4.0)" is different.
            // That would break the merge operation in the Mapping class.
            .append((versionRange == null ? null : versionRange.toString()));

    return hb.toHashCode();
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.AbstractIdAndCodeHolder.java

@Override
public int hashCode() {
    final HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(getCode());
    return builder.toHashCode();
}

From source file:com.disney.opa.dom.comment.CommentType.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(templateID);
    builder.append(commentTypeID);//from   w w  w .j av  a2  s. c  o  m
    builder.append(userTypeID);
    builder.append(pageTypeID);
    builder.append(canView);
    builder.append(canCreate);
    return builder.toHashCode();
}

From source file:fr.xebia.demo.wicket.blog.data.Category.java

@Override
public int hashCode() {
    HashCodeBuilder hashCodeBuilder = new HashCodeBuilder();
    hashCodeBuilder.append(getId());
    hashCodeBuilder.append(getDescription());
    hashCodeBuilder.append(getName());/*ww w . ja  v a2  s.co m*/
    hashCodeBuilder.append(getNicename());
    return hashCodeBuilder.toHashCode();
}

From source file:net.kamhon.ieagle.function.user.vo.UserRoleAccessKey.java

public int hashCode() {
    HashCodeBuilder hashCode = new HashCodeBuilder();
    if (roleId != null)
        hashCode.append(roleId);
    if (accessCode != null)
        hashCode.append(accessCode);/*from w w w .jav  a  2s . c o  m*/
    return hashCode.toHashCode();
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier.java

@Override
public int hashCode() {
    final HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(getDatabaseInstanceCode());
    builder.append(getGroupCode());/*  w w w.j  a  v  a  2s. c  o m*/
    return builder.toHashCode();
}

From source file:net.kamhon.ieagle.function.system.vo.SysParamKey.java

public int hashCode() {
    HashCodeBuilder hashCode = new HashCodeBuilder();
    if (sysParamCode != null)
        hashCode.append(sysParamCode);
    if (compId != null)
        hashCode.append(compId);//from  w  w w  .  j av  a  2  s .  c o  m
    return hashCode.toHashCode();
}

From source file:net.kamhon.ieagle.function.language.vo.LanguageResKey.java

public int hashCode() {
    HashCodeBuilder hashCode = new HashCodeBuilder();
    if (languageCode != null)
        hashCode.append(languageCode);
    if (keyCode != null)
        hashCode.append(keyCode);//from   w ww .  ja  va2 s  .c o  m
    return hashCode.toHashCode();
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.TimeInterval.java

@Override
public final int hashCode() {
    final HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(from);
    builder.append(until);//from w  w w.ja v a2s .c o m
    return builder.toHashCode();
}

From source file:com.redhat.rhn.domain.rhnpackage.profile.ProfileEntry.java

/**
 *
 * {@inheritDoc}//from w  ww  .  j a  v  a  2  s  .  c o  m
 */
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(name.getName()).append(evr.getEpoch()).append(evr.getRelease()).append(evr.getVersion());

    if (arch != null) {
        builder.append(arch.getName());
    }

    return builder.toHashCode();
}