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

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

Introduction

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

Prototype

public HashCodeBuilder() 

Source Link

Document

Uses two hard coded choices for the constants needed to build a hashCode.

Usage

From source file:Main.java

public int hashCode() {
    return new HashCodeBuilder().append(id).append(title).append(author).toHashCode();

    // return HashCodeBuilder.reflectionHashCode(this);

}

From source file:easycare.alc.service.report.HstPrescriptionReportHashGeneratorService.java

public int generatePrescriptionReportHash(HstPatient patient, User user, HstInterpretation interpretation) {
    return new HashCodeBuilder().append(getPatientDetailsHash(patient)).append(getPhysicianDetailsHash(user))
            .append(getOrgDetailsHash(patient)).append(getInterpretationHash(interpretation)).toHashCode();
}

From source file:com.ceutecsps.adminplanilla.documents.AbstractDoc.java

@Override
public int hashCode() {
    return new HashCodeBuilder().append(id).append(inactive_date).toHashCode();
}

From source file:easycare.alc.service.report.HstDiagnosticReportHashGeneratorService.java

public int generateDiagnosticReportHash(HstPatient patient, User user, HstData hstData,
        HstDiagnosticReportDetails reportDetails, HstInterpretation interpretation) {
    return new HashCodeBuilder().append(getPatientDetailsHash(patient)).append(getPhysicianDetailsHash(user))
            .append(getOrgDetailsHash(patient)).append(getHstDataHash(hstData))
            .append(getDiagnosticReportDetailsHash(reportDetails)).append(getInterpretationHash(interpretation))
            .toHashCode();/*from w w  w.java2 s  .  com*/
}

From source file:com.liferay.portal.util.HashCodeImpl.java

public HashCodeImpl() {
    _hashCodeBuilder = new HashCodeBuilder();
}

From source file:com.ms.commons.test.common.dbencoding.DbField.java

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder();
    hcb.append(table);
    hcb.append(field);
    return hcb.toHashCode();
}

From source file:edu.umd.cs.psl.model.kernel.rule.ConstraintRuleKernel.java

public ConstraintRuleKernel(Model m, Formula f) {
    super(m, f);
    hashcode = new HashCodeBuilder().append(model).append(formula).toHashCode();
}

From source file:easycare.alc.service.report.HstDiagnosticReportHashGeneratorService.java

private int getPatientDetailsHash(HstPatient patient) {
    return new HashCodeBuilder().append(patient.getFirstName()).append(patient.getLastName())
            .append(patient.getMrn()).append(patient.getDob()).append(patient.getGender())
            .append(patient.getBmi()).toHashCode();
}

From source file:com.cloudera.crunch.TupleN.java

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder();
    for (Object v : values) {
        hcb.append(v);/*from  ww  w . ja  v  a  2 s  .com*/
    }
    return hcb.toHashCode();
}

From source file:com.cognifide.slice.core.internal.context.CacheableContextKey.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(path);/*from w w w . j a  v  a 2s  .c  om*/
    builder.append(type);
    return builder.toHashCode();
}