List of usage examples for java.util Arrays hashCode
public static int hashCode(Object a[])
From source file:org.teiid.resource.adapter.ftp.FtpManagedConnectionFactory.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.parentDirectory == null) ? 0 : this.parentDirectory.hashCode()); result = prime * result + ((this.username == null) ? 0 : this.username.hashCode()); result = prime * result + ((this.password == null) ? 0 : this.password.hashCode()); result = prime * result + ((this.host == null) ? 0 : this.host.hashCode()); result = prime * result + ((this.controlEncoding == null) ? 0 : this.controlEncoding.hashCode()); result = prime * result + ((this.connectTimeout == null) ? 0 : this.connectTimeout.hashCode()); result = prime * result + ((this.dataTimeout == null) ? 0 : this.dataTimeout.hashCode()); result = prime * result + ((this.defaultTimeout == null) ? 0 : this.defaultTimeout.hashCode()); result = prime * result + this.port; result = prime * result + this.fileType; result = prime * result + this.clientMode; result = prime * result + this.bufferSize; if (this.isFtps) { result = prime * result + ((this.certificate == null) ? 0 : this.certificate.hashCode()); result = prime * result + ((this.keyPath == null) ? 0 : this.keyPath.hashCode()); result = prime * result + ((this.keyPassword == null) ? 0 : this.keyPassword.hashCode()); result = prime * result + ((this.authValue == null) ? 0 : this.authValue.hashCode()); result = prime * result + ((this.protocol == null) ? 0 : this.protocol.hashCode()); result = prime * result + ((this.execProt == null) ? 0 : this.execProt.hashCode()); result = prime * result + ((this.useClientMode == null) ? 0 : this.useClientMode.hashCode()); result = prime * result + ((this.sessionCreation == null) ? 0 : this.sessionCreation.hashCode()); result = prime * result + ((this.needClientAuth == null) ? 0 : this.needClientAuth.hashCode()); result = prime * result + ((this.wantsClientAuth == null) ? 0 : this.wantsClientAuth.hashCode()); result = prime * result + ((this.implicit) ? 1231 : 1237); result = prime * result + ((this.cipherSuites == null) ? 0 : Arrays.hashCode(this.cipherSuites)); result = prime * result + ((this.protocols == null) ? 0 : Arrays.hashCode(this.protocols)); }/* ww w . j a v a 2s . c o m*/ return result; }
From source file:com.opengamma.analytics.financial.instrument.future.FederalFundsFutureSecurityDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Arrays.hashCode(_fixingPeriodAccrualFactor); result = prime * result + Arrays.hashCode(_fixingPeriodDate); result = prime * result + _index.hashCode(); result = prime * result + _lastTradingDate.hashCode(); result = prime * result + _name.hashCode(); long temp;//ww w . jav a 2s . co m temp = Double.doubleToLongBits(_notional); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_marginAccrualFactor); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:org.pentaho.reporting.libraries.base.util.ObjectUtilities.java
public static int hashCode(final Object[] array1) { if (array1 == null) { return 0; }/*from w ww . ja v a 2 s.c o m*/ return Arrays.hashCode(array1); }
From source file:org.tango.server.attribute.AttributePropertiesImpl.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Arrays.hashCode(alarmExtensions); result = prime * result + (deltaT == null ? 0 : deltaT.hashCode()); result = prime * result + (int) (deltaTLong ^ deltaTLong >>> 32); result = prime * result + (deltaVal == null ? 0 : deltaVal.hashCode()); long temp;/* www .j av a 2 s . c o m*/ temp = Double.doubleToLongBits(deltaValDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (description == null ? 0 : description.hashCode()); result = prime * result + (displayUnit == null ? 0 : displayUnit.hashCode()); result = prime * result + Arrays.hashCode(enumLabels); result = prime * result + (eventProp == null ? 0 : eventProp.hashCode()); result = prime * result + Arrays.hashCode(extensions); result = prime * result + (format == null ? 0 : format.hashCode()); result = prime * result + (isEnumMutable ? 1231 : 1237); result = prime * result + (isFwdAttribute ? 1231 : 1237); result = prime * result + (label == null ? 0 : label.hashCode()); result = prime * result + (maxAlarm == null ? 0 : maxAlarm.hashCode()); temp = Double.doubleToLongBits(maxAlarmDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (maxValue == null ? 0 : maxValue.hashCode()); temp = Double.doubleToLongBits(maxValueDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (maxWarning == null ? 0 : maxWarning.hashCode()); temp = Double.doubleToLongBits(maxWarningDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (minAlarm == null ? 0 : minAlarm.hashCode()); temp = Double.doubleToLongBits(minAlarmDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (minValue == null ? 0 : minValue.hashCode()); temp = Double.doubleToLongBits(minValueDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (minWarning == null ? 0 : minWarning.hashCode()); temp = Double.doubleToLongBits(minWarningDouble); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (rootAttribute == null ? 0 : rootAttribute.hashCode()); result = prime * result + (standardUnit == null ? 0 : standardUnit.hashCode()); result = prime * result + Arrays.hashCode(sysExtensions); result = prime * result + (unit == null ? 0 : unit.hashCode()); result = prime * result + (writableAttrName == null ? 0 : writableAttrName.hashCode()); return result; }
From source file:ffx.potential.parameters.TorsionTorsionType.java
/** * {@inheritDoc}//from w w w.j a v a 2 s . c o m */ @Override public int hashCode() { int hash = 3; hash = 47 * hash + Arrays.hashCode(atomClasses); return hash; }
From source file:com.opengamma.analytics.financial.instrument.payment.CouponIborCompoundingFlatSpreadDefinition.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Arrays.hashCode(_fixingDates); result = prime * result + Arrays.hashCode(_fixingSubperiodAccrualFactors); result = prime * result + Arrays.hashCode(_fixingSuberiodEndDates); result = prime * result + Arrays.hashCode(_fixingSubperiodStartDates); result = prime * result + ((_index == null) ? 0 : _index.hashCode()); long temp;/* w w w .ja v a 2s. c om*/ temp = Double.doubleToLongBits(_spread); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + Arrays.hashCode(_subperiodAccrualEndDates); result = prime * result + Arrays.hashCode(_subperiodAccrualFactors); result = prime * result + Arrays.hashCode(_subperiodAccrualStartDates); return result; }
From source file:org.apache.shindig.gadgets.http.HttpResponse.java
@Override public int hashCode() { return httpStatusCode ^ headers.hashCode() ^ Arrays.hashCode(responseBytes); }
From source file:com.amazon.carbonado.layout.LayoutFactory.java
private static int annValueHashCode(Object value) { Class type = value.getClass(); if (!type.isArray()) { if (value instanceof String || type.isPrimitive()) { return value.hashCode(); } else if (value instanceof Class) { // Use name for stable hash code. return ((Class) value).getName().hashCode(); } else if (value instanceof Enum) { // Use name for stable hash code. return ((Enum) value).name().hashCode(); } else if (value instanceof Annotation) { return annHashCode((Annotation) value); } else {//from ww w. java 2s . co m return value.hashCode(); } } else if (type == byte[].class) { return Arrays.hashCode((byte[]) value); } else if (type == char[].class) { return Arrays.hashCode((char[]) value); } else if (type == double[].class) { return Arrays.hashCode((double[]) value); } else if (type == float[].class) { return Arrays.hashCode((float[]) value); } else if (type == int[].class) { return Arrays.hashCode((int[]) value); } else if (type == long[].class) { return Arrays.hashCode((long[]) value); } else if (type == short[].class) { return Arrays.hashCode((short[]) value); } else if (type == boolean[].class) { return Arrays.hashCode((boolean[]) value); } else { return Arrays.hashCode((Object[]) value); } }
From source file:com.hubrick.vertx.rest.impl.DefaultRestClientRequest.java
private MultiKey createCacheKey(String uri, MultiMap headers, byte[] body) { return new MultiKey(uri, headers.entries().stream().map(e -> e.getKey() + ": " + e.getValue()).sorted() .collect(Collectors.toList()), Arrays.hashCode(body)); }
From source file:com.offbynull.voip.kademlia.model.BitString.java
@Override public int hashCode() { int hash = 7; hash = 89 * hash + Arrays.hashCode(this.data); hash = 89 * hash + this.bitLength; return hash;/* w w w.j a va 2 s. c o m*/ }