Example usage for com.google.common.primitives Booleans hashCode

List of usage examples for com.google.common.primitives Booleans hashCode

Introduction

In this page you can find the example usage for com.google.common.primitives Booleans hashCode.

Prototype

public static int hashCode(boolean value) 

Source Link

Document

Returns a hash code for value ; equal to the result of invoking ((Boolean) value).hashCode() .

Usage

From source file:com.facebook.presto.sql.gen.Operations.java

public static int hashCode(boolean value) {
    return Booleans.hashCode(value);
}

From source file:net.conquiris.api.index.MutableIndexerActivationPolicy.java

@Override
public int hashCode() {
    return Booleans.hashCode(active);
}

From source file:com.torodb.kvdocument.values.KvBoolean.java

/**
 * The hashCode of a KvBoolean the same as {@link Boolean#hashCode() } applied to its value.
 *
 * @return//w  ww  .ja  v a  2 s .  c o m
 */
@Override
public int hashCode() {
    return Booleans.hashCode(getPrimitiveValue());
}

From source file:com.torodb.mongowp.bson.abst.AbstractBsonBoolean.java

@Override
public final int hashCode() {
    return Booleans.hashCode(getPrimitiveValue());
}

From source file:com.google.template.soy.data.restricted.BooleanData.java

@Override
public int hashCode() {
    return Booleans.hashCode(value);
}

From source file:org.openo.msb.wrapper.consul.option.ImmutableQueryOptions.java

/**
 * Computes a hash code from attributes: {@code wait}, {@code token}, {@code index}, {@code near}, {@code consistencyMode}, {@code isBlocking}, {@code hasToken}.
 * @return hashCode value/*from  w w w. j  a  v a  2 s .c  o m*/
 */
@Override
public int hashCode() {
    int h = 31;
    h = h * 17 + wait.hashCode();
    h = h * 17 + token.hashCode();
    h = h * 17 + index.hashCode();
    h = h * 17 + near.hashCode();
    h = h * 17 + consistencyMode.hashCode();
    h = h * 17 + Booleans.hashCode(isBlocking);
    h = h * 17 + Booleans.hashCode(hasToken);
    return h;
}