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:org.apache.accumulo.core.clientImpl.AuthenticationTokenIdentifier.java

@Override
public int hashCode() {
    if (impl == null) {
        return 0;
    }/*  w  ww  .  java  2s .co  m*/
    HashCodeBuilder hcb = new HashCodeBuilder(7, 11);
    if (impl.isSetPrincipal()) {
        hcb.append(impl.getPrincipal());
    }
    if (impl.isSetKeyId()) {
        hcb.append(impl.getKeyId());
    }
    if (impl.isSetIssueDate()) {
        hcb.append(impl.getIssueDate());
    }
    if (impl.isSetExpirationDate()) {
        hcb.append(impl.getExpirationDate());
    }
    if (impl.isSetInstanceId()) {
        hcb.append(impl.getInstanceId());
    }
    return hcb.toHashCode();
}

From source file:org.apache.accumulo.core.rpc.SaslClientDigestCallbackHandler.java

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder(41, 47);
    hcb.append(userName).append(userPassword);
    return hcb.toHashCode();
}

From source file:org.apache.accumulo.core.rpc.SaslConnectionParams.java

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder(23, 29);
    hcb.append(kerberosServerPrimary).append(saslProperties).append(qop.hashCode()).append(principal)
            .append(mechanism).append(callbackHandler);
    return hcb.toHashCode();
}

From source file:org.apache.accumulo.server.security.delegation.AuthenticationKey.java

@Override
public int hashCode() {
    if (null == authKey) {
        return 1;
    }//w  w w .  j a  v  a2 s . c o  m
    HashCodeBuilder hcb = new HashCodeBuilder(29, 31);
    hcb.append(authKey.getKeyId()).append(authKey.getExpirationDate()).append(authKey.getCreationDate())
            .append(secret.getEncoded());
    return hcb.toHashCode();
}

From source file:org.apache.accumulo.test.merkle.MerkleTreeNode.java

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder(1395, 39532);
    return hcb.append(range).append(level).append(children).append(hash).toHashCode();
}

From source file:org.apache.cassandra.thrift.AuthenticationException.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();

    boolean present_why = true && (isSetWhy());
    builder.append(present_why);
    if (present_why)
        builder.append(why);/*from w ww.  j av  a  2 s.co  m*/

    return builder.toHashCode();
}

From source file:org.apache.cassandra.thrift.AuthenticationRequest.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();

    boolean present_credentials = true && (isSetCredentials());
    builder.append(present_credentials);
    if (present_credentials)
        builder.append(credentials);// w  w w . j  a va  2  s. com

    return builder.toHashCode();
}

From source file:org.apache.cassandra.thrift.BatchMutateResult.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();

    boolean present_deps = true && (isSetDeps());
    builder.append(present_deps);
    if (present_deps)
        builder.append(deps);//from   www.j  a v  a2  s.  c  o m

    boolean present_lts = true;
    builder.append(present_lts);
    if (present_lts)
        builder.append(lts);

    return builder.toHashCode();
}

From source file:org.apache.cassandra.thrift.CfDef.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();

    boolean present_keyspace = true && (isSetKeyspace());
    builder.append(present_keyspace);
    if (present_keyspace)
        builder.append(keyspace);// w w  w. j av  a2  s.  co  m

    boolean present_name = true && (isSetName());
    builder.append(present_name);
    if (present_name)
        builder.append(name);

    boolean present_column_type = true && (isSetColumn_type());
    builder.append(present_column_type);
    if (present_column_type)
        builder.append(column_type);

    boolean present_comparator_type = true && (isSetComparator_type());
    builder.append(present_comparator_type);
    if (present_comparator_type)
        builder.append(comparator_type);

    boolean present_subcomparator_type = true && (isSetSubcomparator_type());
    builder.append(present_subcomparator_type);
    if (present_subcomparator_type)
        builder.append(subcomparator_type);

    boolean present_comment = true && (isSetComment());
    builder.append(present_comment);
    if (present_comment)
        builder.append(comment);

    boolean present_row_cache_size = true && (isSetRow_cache_size());
    builder.append(present_row_cache_size);
    if (present_row_cache_size)
        builder.append(row_cache_size);

    boolean present_key_cache_size = true && (isSetKey_cache_size());
    builder.append(present_key_cache_size);
    if (present_key_cache_size)
        builder.append(key_cache_size);

    boolean present_read_repair_chance = true && (isSetRead_repair_chance());
    builder.append(present_read_repair_chance);
    if (present_read_repair_chance)
        builder.append(read_repair_chance);

    boolean present_column_metadata = true && (isSetColumn_metadata());
    builder.append(present_column_metadata);
    if (present_column_metadata)
        builder.append(column_metadata);

    boolean present_gc_grace_seconds = true && (isSetGc_grace_seconds());
    builder.append(present_gc_grace_seconds);
    if (present_gc_grace_seconds)
        builder.append(gc_grace_seconds);

    boolean present_default_validation_class = true && (isSetDefault_validation_class());
    builder.append(present_default_validation_class);
    if (present_default_validation_class)
        builder.append(default_validation_class);

    boolean present_id = true && (isSetId());
    builder.append(present_id);
    if (present_id)
        builder.append(id);

    boolean present_min_compaction_threshold = true && (isSetMin_compaction_threshold());
    builder.append(present_min_compaction_threshold);
    if (present_min_compaction_threshold)
        builder.append(min_compaction_threshold);

    boolean present_max_compaction_threshold = true && (isSetMax_compaction_threshold());
    builder.append(present_max_compaction_threshold);
    if (present_max_compaction_threshold)
        builder.append(max_compaction_threshold);

    boolean present_row_cache_save_period_in_seconds = true && (isSetRow_cache_save_period_in_seconds());
    builder.append(present_row_cache_save_period_in_seconds);
    if (present_row_cache_save_period_in_seconds)
        builder.append(row_cache_save_period_in_seconds);

    boolean present_key_cache_save_period_in_seconds = true && (isSetKey_cache_save_period_in_seconds());
    builder.append(present_key_cache_save_period_in_seconds);
    if (present_key_cache_save_period_in_seconds)
        builder.append(key_cache_save_period_in_seconds);

    boolean present_memtable_flush_after_mins = true && (isSetMemtable_flush_after_mins());
    builder.append(present_memtable_flush_after_mins);
    if (present_memtable_flush_after_mins)
        builder.append(memtable_flush_after_mins);

    boolean present_memtable_throughput_in_mb = true && (isSetMemtable_throughput_in_mb());
    builder.append(present_memtable_throughput_in_mb);
    if (present_memtable_throughput_in_mb)
        builder.append(memtable_throughput_in_mb);

    boolean present_memtable_operations_in_millions = true && (isSetMemtable_operations_in_millions());
    builder.append(present_memtable_operations_in_millions);
    if (present_memtable_operations_in_millions)
        builder.append(memtable_operations_in_millions);

    boolean present_replicate_on_write = true && (isSetReplicate_on_write());
    builder.append(present_replicate_on_write);
    if (present_replicate_on_write)
        builder.append(replicate_on_write);

    boolean present_merge_shards_chance = true && (isSetMerge_shards_chance());
    builder.append(present_merge_shards_chance);
    if (present_merge_shards_chance)
        builder.append(merge_shards_chance);

    boolean present_key_validation_class = true && (isSetKey_validation_class());
    builder.append(present_key_validation_class);
    if (present_key_validation_class)
        builder.append(key_validation_class);

    boolean present_row_cache_provider = true && (isSetRow_cache_provider());
    builder.append(present_row_cache_provider);
    if (present_row_cache_provider)
        builder.append(row_cache_provider);

    boolean present_key_alias = true && (isSetKey_alias());
    builder.append(present_key_alias);
    if (present_key_alias)
        builder.append(key_alias);

    return builder.toHashCode();
}

From source file:org.apache.cassandra.thrift.Column.java

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();

    boolean present_name = true && (isSetName());
    builder.append(present_name);
    if (present_name)
        builder.append(name);/*from  w  w w  .  ja va 2  s.  c o  m*/

    boolean present_value = true && (isSetValue());
    builder.append(present_value);
    if (present_value)
        builder.append(value);

    boolean present_timestamp = true && (isSetTimestamp());
    builder.append(present_timestamp);
    if (present_timestamp)
        builder.append(timestamp);

    boolean present_ttl = true && (isSetTtl());
    builder.append(present_ttl);
    if (present_ttl)
        builder.append(ttl);

    return builder.toHashCode();
}