List of usage examples for java.lang Double doubleToLongBits
@HotSpotIntrinsicCandidate public static long doubleToLongBits(double value)
From source file:com.opengamma.analytics.financial.forex.derivative.ForexNonDeliverableForward.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _currency1.hashCode(); result = prime * result + _currency2.hashCode(); long temp;/* ww w.j a v a 2s .c o m*/ temp = Double.doubleToLongBits(_exchangeRate); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_fixingTime); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_notional); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_paymentTime); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.commodity.definition.CommodityFutureDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _underlying.hashCode(); result = prime * result + _expiryDate.hashCode(); if (_firstDeliveryDate != null) { result = prime * result + _firstDeliveryDate.hashCode(); }// w w w. j a v a 2 s. c o m if (_lastDeliveryDate != null) { result = prime * result + _lastDeliveryDate.hashCode(); } result = prime * result + _unitName.hashCode(); result = prime * result + _settlementType.hashCode(); result = prime * result + _currency.hashCode(); result = prime * result + _settlementDate.hashCode(); long temp; temp = Double.doubleToLongBits(_amount); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_unitAmount); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_referencePrice); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.instrument.future.InterestRateFutureOptionMarginTransactionDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _quantity; result = prime * result + _tradeDate.hashCode(); long temp;/*from w w w .ja v a 2 s . c om*/ temp = Double.doubleToLongBits(_tradePrice); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _underlyingOption.hashCode(); return result; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborCompounded.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.hashCode(); result = prime * result + _index.hashCode(); long temp;/* www. j av a 2 s. co m*/ temp = Double.doubleToLongBits(_notionalAccrued); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + Arrays.hashCode(_paymentAccrualFactors); return result; }
From source file:com.meetup.memcached.NativeHandler.java
protected static byte[] encode(double value) throws Exception { return encode((long) Double.doubleToLongBits(value)); }
From source file:com.opengamma.analytics.financial.instrument.payment.CouponIborSpreadDefinition.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp;//from w w w. jav a 2 s . com temp = Double.doubleToLongBits(_fixingPeriodAccrualFactor); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _fixingPeriodEndDate.hashCode(); result = prime * result + _fixingPeriodStartDate.hashCode(); result = prime * result + _index.hashCode(); temp = Double.doubleToLongBits(_spread); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_spreadAmount); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _calendar.hashCode(); return result; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborCompoundingSpread.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 + _index.hashCode(); long temp;/*from w ww .j a va 2 s . c o m*/ temp = Double.doubleToLongBits(_notionalAccrued); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + Arrays.hashCode(_paymentAccrualFactors); temp = Double.doubleToLongBits(_spread); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:dk.dma.enav.model.geometry.Position.java
/** * Hash code for the location/* w ww. ja v a 2 s . co m*/ */ @Override public int hashCode() { // If we need to use this as a key somewhere we can use the same hash // code technique as java.lang.String long latLong = Double.doubleToLongBits(latitude); long lonLong = Double.doubleToLongBits(longitude); return (int) (latLong ^ latLong >>> 32) ^ (int) (lonLong ^ lonLong >>> 32); }
From source file:com.opengamma.util.money.CurrencyAmount.java
/** * Returns a suitable hash code for the amount. * //from w w w . ja v a 2 s . c om * @return the hash code */ @Override public int hashCode() { final int prime = 31; int result = 1; long amountBits = Double.doubleToLongBits(_amount); result = prime * result + (int) (amountBits ^ (amountBits >>> 32)); result = prime * result + _currency.hashCode(); return result; }
From source file:com.opengamma.analytics.financial.instrument.future.BondFutureOptionPremiumTransactionDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*w w w . j a v a 2s. co m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BondFutureOptionPremiumTransactionDefinition other = (BondFutureOptionPremiumTransactionDefinition) obj; if (!ObjectUtils.equals(_premium, other._premium)) { return false; } if (_quantity != other._quantity) { return false; } if (Double.doubleToLongBits(_tradePrice) != Double.doubleToLongBits(other._tradePrice)) { return false; } if (!ObjectUtils.equals(_underlyingOption, other._underlyingOption)) { return false; } return true; }