Example usage for java.util Arrays hashCode

List of usage examples for java.util Arrays hashCode

Introduction

In this page you can find the example usage for java.util Arrays hashCode.

Prototype

public static int hashCode(Object a[]) 

Source Link

Document

Returns a hash code based on the contents of the specified array.

Usage

From source file:org.apache.drill.exec.record.TypedFieldId.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(fieldIds);
    result = prime * result + ((finalType == null) ? 0 : finalType.hashCode());
    result = prime * result + ((intermediateType == null) ? 0 : intermediateType.hashCode());
    result = prime * result + (isHyperReader ? 1231 : 1237);
    result = prime * result + ((remainder == null) ? 0 : remainder.hashCode());
    result = prime * result + ((secondaryFinal == null) ? 0 : secondaryFinal.hashCode());
    return result;
}

From source file:cs544.wamp_blog_engine.domain.User.java

@Override
public int hashCode() {
    int hash = 7;
    hash = 89 * hash + (this.firstname != null ? this.firstname.hashCode() : 0);
    hash = 89 * hash + (this.lastname != null ? this.lastname.hashCode() : 0);
    hash = 89 * hash + (this.email != null ? this.email.hashCode() : 0);
    hash = 89 * hash + (this.dob != null ? this.dob.hashCode() : 0);
    hash = 89 * hash + Arrays.hashCode(this.profilepic);
    return hash;//from  ww w .ja  v a  2  s.  c o m
}

From source file:org.jboss.aerogear.android.pipe.loader.LoaderAdapter.java

@Override
public void remove(String toRemoveId, Callback<Void> callback) {
    int id = Arrays.hashCode(new Object[] { name, toRemoveId, callback });
    Bundle bundle = new Bundle();
    bundle.putSerializable(CALLBACK, callback);
    bundle.putSerializable(REMOVE_ID, toRemoveId);
    bundle.putSerializable(METHOD, Methods.REMOVE);
    manager.initLoader(id, bundle, this);
}

From source file:org.lambdamatic.analyzer.ast.node.ArrayVariable.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(this.elements);
    result = prime * result + ((this.instanceType == null) ? 0 : this.instanceType.hashCode());
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponArithmeticAverageON.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + Arrays.hashCode(_fixingPeriodAccrualFactors);
    long temp;/*from ww w . j a  v  a2  s.co m*/
    temp = Double.doubleToLongBits(_fixingPeriodRemainingAccrualFactor);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + Arrays.hashCode(_fixingPeriodTimes);
    result = prime * result + _index.hashCode();
    temp = Double.doubleToLongBits(_rateAccrued);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:org.uma.jmetal.util.point.impl.PointSolutionTest.java

@Test
public void shouldHashCodeReturnTheCorrectValue() {
    int numberOfObjectives = 3;
    double[] values = { 1.0, 2.0, 3.0 };
    PointSolution solution = new PointSolution(numberOfObjectives);
    ReflectionTestUtils.setField(solution, "objectives", values);

    assertEquals(Arrays.hashCode(values), solution.hashCode());
}

From source file:com.github.richardwilly98.esdms.FileImpl.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((author == null) ? 0 : author.hashCode());
    result = prime * result + Arrays.hashCode(content);
    result = prime * result + ((contentType == null) ? 0 : contentType.hashCode());
    result = prime * result + ((date == null) ? 0 : date.hashCode());
    result = prime * result + ((name == null) ? 0 : name.hashCode());
    result = prime * result + ((title == null) ? 0 : title.hashCode());
    result = prime * result + ((language == null) ? 0 : language.hashCode());
    return result;
}

From source file:com.opengamma.analytics.financial.model.interestrate.definition.G2ppPiecewiseConstantParameters.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;//from w  w  w. ja  v  a2  s .  c  o m
    temp = Double.doubleToLongBits(_correlation);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + Arrays.hashCode(_meanReversion);
    result = prime * result + Arrays.hashCode(_volatility);
    result = prime * result + _volatilityTime.hashCode();
    return result;
}

From source file:net.sf.jclal.util.random.Ranlux.java

@Override
public int hashCode() {
    int hash = 3;
    hash = 53 * hash + this.nskip;
    hash = 53 * hash + Float.floatToIntBits(this.twom24);
    hash = 53 * hash + Float.floatToIntBits(this.twom12);
    hash = 53 * hash + this.i24;
    hash = 53 * hash + this.j24;
    hash = 53 * hash + this.in24;
    hash = 53 * hash + this.kount;
    hash = 53 * hash + Float.floatToIntBits(this.carry);
    hash = 53 * hash + Arrays.hashCode(this.seeds);
    return hash;//from w  ww  . ja v a  2 s  .c  om
}

From source file:org.jamocha.filter.PathNodeFilterSet.java

private int generateHashCode() {
    return Arrays.hashCode(
            getNormalizedPathFilter().getFilters().stream().mapToInt(f -> f.getFunction().hash()).toArray());
}