List of usage examples for java.util Arrays hashCode
public static int hashCode(Object a[])
From source file:de.yaacc.player.LocalImagePlayer.java
private PendingIntent getNotificationIntent(ArrayList<Uri> uris) { Intent intent = new Intent(context, ImageViewerActivity.class); intent.setData(Uri.parse("http://0.0.0.0/" + Arrays.hashCode(uris.toArray()) + "")); //just for making the intents different http://stackoverflow.com/questions/10561419/scheduling-more-than-one-pendingintent-to-same-activity-using-alarmmanager intent.putExtra(ImageViewerActivity.URIS, uris); notificationIntent = PendingIntent.getActivity(context, 0, intent, 0); return notificationIntent; }
From source file:com.alliander.osgp.oslp.OslpEnvelope.java
@Override public int hashCode() { int result = this.securityKey != null ? Arrays.hashCode(this.securityKey) : 0; result = 31 * result + (this.sequenceNumber != null ? Arrays.hashCode(this.sequenceNumber) : 0); result = 31 * result + (this.deviceId != null ? Arrays.hashCode(this.deviceId) : 0); result = 31 * result + (this.payloadMessage != null ? this.payloadMessage.hashCode() : 0); result = 31 * result + (this.signature != null ? this.signature.hashCode() : 0); result = 31 * result + (this.provider != null ? this.provider.hashCode() : 0); result = 31 * result + (this.privateKey != null ? this.privateKey.hashCode() : 0); return result; }
From source file:com.opengamma.analytics.financial.greeks.PDEResultCollection.java
@Override public int hashCode() { final int prime = 31; int result = 1; for (final Map.Entry<Greek, double[]> entry : _gridDataMap.entrySet()) { result = prime * result + entry.getKey().hashCode(); if (entry.getValue() != null) { result = prime * result + Arrays.hashCode(entry.getValue()); }/* w w w.j a v a 2 s . c om*/ } result = prime * result + Arrays.hashCode(_strikes); return result; }
From source file:com.kylinolap.common.hll.HyperLogLogPlusCounter.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((hashFunc == null) ? 0 : hashFunc.hashCode()); result = prime * result + p;//from w w w .java2s .c o m result = prime * result + Arrays.hashCode(registers); return result; }
From source file:twitter4j.internal.json.TweetJSONImpl.java
@Override public int hashCode() { int result = text != null ? text.hashCode() : 0; result = 31 * result + (int) (toUserId ^ (toUserId >>> 32)); result = 31 * result + (toUser != null ? toUser.hashCode() : 0); result = 31 * result + (toUserName != null ? toUserName.hashCode() : 0); result = 31 * result + (fromUser != null ? fromUser.hashCode() : 0); result = 31 * result + (fromUserName != null ? fromUserName.hashCode() : 0); result = 31 * result + (int) (id ^ (id >>> 32)); result = 31 * result + (int) (fromUserId ^ (fromUserId >>> 32)); result = 31 * result + (isoLanguageCode != null ? isoLanguageCode.hashCode() : 0); result = 31 * result + (source != null ? source.hashCode() : 0); result = 31 * result + (int) (inReplyToStatusId ^ (inReplyToStatusId >>> 32)); result = 31 * result + (profileImageUrl != null ? profileImageUrl.hashCode() : 0); result = 31 * result + (createdAt != null ? createdAt.hashCode() : 0); result = 31 * result + (location != null ? location.hashCode() : 0); result = 31 * result + (place != null ? place.hashCode() : 0); result = 31 * result + (geoLocation != null ? geoLocation.hashCode() : 0); result = 31 * result + (annotations != null ? annotations.hashCode() : 0); result = 31 * result + (userMentionEntities != null ? Arrays.hashCode(userMentionEntities) : 0); result = 31 * result + (urlEntities != null ? Arrays.hashCode(urlEntities) : 0); result = 31 * result + (hashtagEntities != null ? Arrays.hashCode(hashtagEntities) : 0); result = 31 * result + (mediaEntities != null ? Arrays.hashCode(mediaEntities) : 0); return result; }
From source file:com.opengamma.analytics.financial.instrument.future.BondFutureDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Arrays.hashCode(_conversionFactor); result = prime * result + Arrays.hashCode(_deliveryBasket); result = prime * result + _deliveryFirstDate.hashCode(); result = prime * result + _deliveryLastDate.hashCode(); result = prime * result + _noticeFirstDate.hashCode(); result = prime * result + _noticeLastDate.hashCode(); long temp;/* w w w . j a v a 2 s . c om*/ temp = Double.doubleToLongBits(_notional); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _settlementDays; result = prime * result + _tradingLastDate.hashCode(); return result; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborCompounding.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Arrays.hashCode(_fixingPeriodAccrualFactors); result = prime * result + Arrays.hashCode(_fixingPeriodEndTimes); result = prime * result + Arrays.hashCode(_fixingPeriodStartTimes); result = prime * result + Arrays.hashCode(_fixingTimes); result = prime * result + (_forwardCurveName == null ? 0 : _forwardCurveName.hashCode()); result = prime * result + _index.hashCode(); long temp;//from www. ja va 2 s .com temp = Double.doubleToLongBits(_notionalAccrued); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + Arrays.hashCode(_paymentAccrualFactors); return result; }
From source file:org.apache.druid.query.aggregation.datasketches.theta.SketchHolder.java
@Override public int hashCode() { return 31 * Arrays.hashCode(this.getSketch().toByteArray()); }
From source file:org.cloudgraph.hbase.graph.ParallelSubgraphTask.java
/** * Assembles a given set of edges where the target is a different row, within * this table or another. Since we are assembling a graph, and each edge links * another row, each edge requires a new row reader. * //w w w. j ava2s . c o m * @param target * the object source to which we link edges * @param prop * the edge property * @param edges * the edges * @param rowReader * the row reader * @param childTableReader * the table reader for the child objects * @param level * the assembly level * @throws IOException */ protected void assembleExternalEdges(PlasmaDataObject target, long targetSequence, PlasmaProperty prop, EdgeReader collection, RowReader rowReader, TableReader childTableReader, int level) throws IOException { for (CellValues childValues : collection.getRowValues()) { // see if this row is locked during fetch, and wait for it Object rowLock = fetchLocks.get(Arrays.hashCode(childValues.getRowKey())); if (rowLock != null) { synchronized (rowLock) { try { rowLock.wait(); } catch (InterruptedException e) { log.error(e.getMessage(), e); } } } RowReader existingChildRowReader = childTableReader.getRowReader(childValues.getRowKey()); if (existingChildRowReader != null) { // If assembled this row root before, // just link it. The data is already complete. PlasmaDataObject existingChild = (PlasmaDataObject) existingChildRowReader.getRootDataObject(); synchronized (existingChild) { synchronized (target) { link(existingChild, target, prop); } } continue; } // While fetching this node, another thread can fail to find an // existing row reader registered // above and fall through to this fetch, and therefore fetch the // same row, in addition // to attempting to create the same row reader below, causing an // error or warning // The second thread may be arriving at this node from another // property/edge and // therefore need to link from another edge above. fetchLocks.put(Arrays.hashCode(childValues.getRowKey()), new Object()); this.assembleExternalEdge(childValues, collection, childTableReader, target, targetSequence, prop, level); rowLock = fetchLocks.remove(Arrays.hashCode(childValues.getRowKey())); if (rowLock != null) { synchronized (rowLock) { rowLock.notifyAll(); } } else { log.error("expected locked row key '" + Bytes.toString(childValues.getRowKey()) + "' for edgeReader, " + collection); } } }
From source file:ded.model.Entity.java
@Override public int hashCode() { int h = 1;/*from www.j ava 2 s . co m*/ h = h * 31 + this.loc.hashCode(); h = h * 31 + this.size.hashCode(); h = h * 31 + this.shape.hashCode(); h = h * 31 + this.fillColor.hashCode(); h = h * 31 + this.name.hashCode(); h = h * 31 + this.attributes.hashCode(); h = h * 31 + Arrays.hashCode(this.shapeParams); h = h * 31 + this.shapeFlags.hashCode(); h = h * 31 + this.anchorName.hashCode(); h = h * 31 + this.imageFileName.hashCode(); h = h * 31 + this.imageFillStyle.hashCode(); return h; }