Example usage for org.apache.commons.lang ObjectUtils hashCode

List of usage examples for org.apache.commons.lang ObjectUtils hashCode

Introduction

In this page you can find the example usage for org.apache.commons.lang ObjectUtils hashCode.

Prototype

public static int hashCode(Object obj) 

Source Link

Document

Gets the hash code of an object returning zero when the object is null.

 ObjectUtils.hashCode(null)   = 0 ObjectUtils.hashCode(obj)    = obj.hashCode() 

Usage

From source file:fr.paris.lutece.plugins.mydashboard.service.MyDashboardComponent.java

/**
 *
 * {@inheritDoc}
 */
@Override
public int hashCode() {
    return ObjectUtils.hashCode(this.getComponentId());
}

From source file:com.opengamma.engine.depgraph.ExceptionWrapper.java

@Override
public int hashCode() {
    return (ObjectUtils.hashCode(_message) * 17 + ObjectUtils.hashCode(_topStackFrame)) * 17
            + ObjectUtils.hashCode(_cause);
}

From source file:com.opengamma.master.historicaltimeseries.impl.HistoricalTimeSeriesRatingRule.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ObjectUtils.hashCode(_fieldName);
    result = prime * result + ObjectUtils.hashCode(_fieldValue);
    result = prime * result + _rating;/*from   w  w w. j a  v  a2 s .  c o m*/
    return result;
}

From source file:com.ocs.dynamo.functional.domain.Domain.java

@Override
public int hashCode() {
    return ObjectUtils.hashCode(id);
}

From source file:de.fu_berlin.inf.dpp.activities.EditorActivity.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + ObjectUtils.hashCode(type);
    return result;
}

From source file:dz.alkhwarizmix.framework.java.dtos.email.model.vo.EMailList.java

protected final int continueHashCode(int result, Object field) {
    return 31 * result + ObjectUtils.hashCode(field);
}

From source file:dz.alkhwarizmix.framework.java.dtos.record.model.vo.RecordList.java

private int continueHashCode(final int result, final Object field) {
    return (31 * result) + ObjectUtils.hashCode(field);
}

From source file:com.opengamma.core.marketdatasnapshot.VolatilityCubeKey.java

/**
 * Returns a suitable hash code.//from   ww w. j av  a2s  .c o  m
 * 
 * @return the hash code
 */
@Override
public int hashCode() {
    return ObjectUtils.hashCode(getCurrency()) ^ ObjectUtils.hashCode(getName());
}

From source file:de.schildbach.game.chess.ChessPosition.java

@Override
public int hashCode() {
    int hashCode = super.hashCode();
    hashCode *= 37;/* ww  w. j  av a2s. c o m*/
    hashCode += Arrays.hashCode(castlingAvailableWhite);
    hashCode *= 37;
    hashCode += Arrays.hashCode(castlingAvailableBlack);
    hashCode *= 37;
    hashCode += ObjectUtils.hashCode(enPassantTargetSquare);
    return hashCode;
}

From source file:com.vaadin.addon.jpacontainer.demo.domain.AbstractItem.java

@Override
public int hashCode() {
    int hash = 7;
    hash = hash * 31 + ObjectUtils.hashCode(description);
    hash = hash * 31 + ObjectUtils.hashCode(quantity);
    hash = hash * 31 + ObjectUtils.hashCode(price);
    return hash;/* ww w  .j av  a 2s .c o  m*/
}