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:com.vmware.identity.util.TimePeriod.java

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

From source file:de.smartics.maven.plugin.jboss.modules.util.classpath.ClassPathContext.java

/**
 * Returns the hash code of the object.
 *
 * @return the hash code.
 */
@Override
public int hashCode() {
    return ObjectUtils.hashCode(archiveRoot);
}

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

@Override
public int hashCode() {
    int hash = 7;
    hash = hash * 31 + ObjectUtils.hashCode(custNo);
    hash = hash * 31 + ObjectUtils.hashCode(customerName);
    hash = hash * 31 + ObjectUtils.hashCode(billingAddress);
    hash = hash * 31 + ObjectUtils.hashCode(shippingAddress);
    hash = hash * 31 + DateUtils.sameDayHashCode(lastInvoiceDate);
    hash = hash * 31 + DateUtils.sameDayHashCode(lastOrderDate);
    hash = hash * 31 + ObjectUtils.hashCode(notes);
    return hash;//from w  ww. j a va  2 s  . co m
}

From source file:dz.alkhwarizmix.framework.java.domain.AbstractAlKhwarizmixDomainObject.java

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

From source file:com.opengamma.id.ExternalIdWithDates.java

@Override
public int hashCode() {
    return _identifier.hashCode() ^ ObjectUtils.hashCode(_validFrom) ^ ObjectUtils.hashCode(_validTo);
}

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

@Override
public int hashCode() {
    int hash = 7;
    hash = hash * 31 + ObjectUtils.hashCode(orderNo);
    hash = hash * 31 + DateUtils.sameDayHashCode(orderDate);
    hash = hash * 31 + ObjectUtils.hashCode(customer);
    hash = hash * 31 + ObjectUtils.hashCode(customerReference);
    hash = hash * 31 + ObjectUtils.hashCode(salesReference);
    hash = hash * 31 + ObjectUtils.hashCode(billingAddress);
    hash = hash * 31 + ObjectUtils.hashCode(shippingAddress);
    hash = hash * 31 + DateUtils.sameDayHashCode(shippedDate);
    hash = hash * 31 + DateUtils.sameDayHashCode(billedDate);
    hash = hash * 31 + ObjectUtils.hashCode(items);
    return hash;//from  w  w w.  j av  a2s.  c om
}

From source file:com.vmware.identity.saml.SamlTokenSpec.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + authnData.hashCode();
    result = prime * result + confirmationData.hashCode();
    result = prime * result + lifespan.hashCode();
    result = prime * result + delegationSpec.hashCode();
    result = prime * result + renewSpec.hashCode();
    result = prime * result + audience.hashCode();
    result = prime * result + adviceRequested.hashCode();
    result = prime * result + advicePresent.hashCode();
    result = prime * result + attributeNames.hashCode();
    result = prime * result + ObjectUtils.hashCode(signatureAlgorithm);
    return result;
}

From source file:com.opengamma.engine.target.ComputationTargetReference.java

@Override
public int hashCode() {
    // Sub-classes must override
    return (getClass().hashCode() * 31 * 31) + ObjectUtils.hashCode(getParent()) * 31 + getType().hashCode();
}

From source file:com.opengamma.engine.view.helper.AvailableOutputImpl.java

@Override
public int hashCode() {
    int hc = 1;// w w  w  . ja va 2s .  c  om
    hc += (hc << 4) + getValueName().hashCode();
    hc += (hc << 4) + _positionProperties.hashCode();
    hc += (hc << 4) + ObjectUtils.hashCode(_portfolioNodeProperties);
    return hc;
}

From source file:com.vmware.identity.session.Session.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + id.hashCode();
    result = prime * result + principalId.hashCode();
    result = prime * result + expireDate.hashCode();
    result = prime * result + participants.hashCode();
    result = prime * result + participantsByUrl.hashCode();
    result = prime * result + authnMethod.hashCode();
    result = prime * result + ObjectUtils.hashCode(logoutRequestData);
    return result;
}