Example usage for org.apache.commons.lang3.builder HashCodeBuilder reflectionHashCode

List of usage examples for org.apache.commons.lang3.builder HashCodeBuilder reflectionHashCode

Introduction

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

Prototype

public static int reflectionHashCode(final Object object, final String... excludeFields) 

Source Link

Document

Uses reflection to build a valid hash code from the fields of object .

Usage

From source file:kamuy.AbstractDataObject.java

/**
 * See {@link HashCodeBuilder#reflectionHashCode(Object, boolean)}.
 * {@inheritDoc}/*from  ww w.  ja v  a2s .  co  m*/
 */
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, false);
}

From source file:io.github.theangrydev.coffee.domain.base.ValueType.java

@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, emptySet());
}

From source file:com.github.aynu.mosir.core.standard.lang.AbstractDataObject.java

/**
 * {@inheritDoc}/*from w ww  .j  a  v  a  2 s. co m*/
 * <dl>
 * <dt>?
 * <dd>(transient)?????????????
 * </dl>
 */
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, TEST_TRANSIENTS);
}

From source file:com.kuzumeji.uuo.framework.standard.shared.AbstractDataObject.java

/**
 * {@inheritDoc}/*from w w  w .j a v  a  2 s  . c  o  m*/
 * <dl>
 * <dt>?
 * <dd>????????((transient)??)
 * </dl>
 */
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, true);
}

From source file:com.yahoo.labs.samoa.topology.impl.ThreadsStream.java

private static int getPIIndexForKey(String key, int parallelism) {
    // If key is null, return a default index: 0
    if (key == null)
        return 0;

    // HashCodeBuilder object does not have reset() method
    // So all objects that get appended will be included in the 
    // computation of the hashcode. 
    // To avoid initialize a HashCodeBuilder for each event,
    // here I use the static method with reflection on the event's key
    int index = HashCodeBuilder.reflectionHashCode(key, true) % parallelism;
    if (index < 0) {
        index += parallelism;//  w w w .j  av a 2s .  c om
    }
    return index;
}

From source file:com.btoddb.chronicle.plunkers.hdfs.StorableAvroEvent.java

@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, false);
}

From source file:com.msopentech.odatajclient.proxy.api.context.EntityUUID.java

/**
 * {@inheritDoc }/*  www  .java  2  s  .  c  om*/
 */
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, "tempKey");
}

From source file:com.threewks.thundr.session.CookieSessionStore.java

@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, true);
}

From source file:com.griddynamics.banshun.ExportTargetSource.java

@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, "target");
}

From source file:com.msopentech.odatajclient.engine.data.ODataTimestamp.java

/**
 * {@inheritDoc }/*from  w ww  . j  av a2s. c om*/
 */
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this, "sdf");
}