Search in sources :

Example 1 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project head by mifos.

the class FeeBO method hashCode.

@Override
public int hashCode() {
    int initialNonZeroOddNumber = 7;
    int multiplierNonZeroOddNumber = 7;
    return new HashCodeBuilder(initialNonZeroOddNumber, multiplierNonZeroOddNumber).append(this.getFeeId()).append(this.getFeeName()).toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 2 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project head by mifos.

the class FundCodeEntity method hashCode.

@Override
public int hashCode() {
    int initialNonZeroOddNumber = 7;
    int multiplierNonZeroOddNumber = 7;
    return new HashCodeBuilder(initialNonZeroOddNumber, multiplierNonZeroOddNumber).append(this.fundcodeId).append(this.fundcodeValue).hashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 3 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project storm by nathanmarz.

the class AlreadyAliveException method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean present_msg = true && (is_set_msg());
    builder.append(present_msg);
    if (present_msg)
        builder.append(msg);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 4 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project storm by nathanmarz.

the class JavaObjectArg method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder();
    hcb.append(this.getClass().getName());
    org.apache.thrift7.TFieldIdEnum setField = getSetField();
    if (setField != null) {
        hcb.append(setField.getThriftFieldId());
        Object value = getFieldValue();
        if (value instanceof org.apache.thrift7.TEnum) {
            hcb.append(((org.apache.thrift7.TEnum) getFieldValue()).getValue());
        } else {
            hcb.append(value);
        }
    }
    return hcb.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 5 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project storm by nathanmarz.

the class TopologySummary method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean present_id = true && (is_set_id());
    builder.append(present_id);
    if (present_id)
        builder.append(id);
    boolean present_name = true && (is_set_name());
    builder.append(present_name);
    if (present_name)
        builder.append(name);
    boolean present_num_tasks = true;
    builder.append(present_num_tasks);
    if (present_num_tasks)
        builder.append(num_tasks);
    boolean present_num_executors = true;
    builder.append(present_num_executors);
    if (present_num_executors)
        builder.append(num_executors);
    boolean present_num_workers = true;
    builder.append(present_num_workers);
    if (present_num_workers)
        builder.append(num_workers);
    boolean present_uptime_secs = true;
    builder.append(present_uptime_secs);
    if (present_uptime_secs)
        builder.append(uptime_secs);
    boolean present_status = true && (is_set_status());
    builder.append(present_status);
    if (present_status)
        builder.append(status);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Aggregations

HashCodeBuilder (org.apache.commons.lang.builder.HashCodeBuilder)200 Writable (org.apache.hadoop.io.Writable)1 StepMeta (org.pentaho.di.trans.step.StepMeta)1