List of usage examples for java.lang Double doubleToLongBits
@HotSpotIntrinsicCandidate public static long doubleToLongBits(double value)
From source file:net.daboross.bukkitdev.skywars.api.location.SkyPlayerLocation.java
@Override public int hashCode() { int result;//from w w w .j a v a 2 s . c om long temp; temp = Double.doubleToLongBits(x); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(y); result = 31 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(z); result = 31 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(yaw); result = 31 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(pitch); result = 31 * result + (int) (temp ^ (temp >>> 32)); result = 31 * result + (world != null ? world.hashCode() : 0); return result; }
From source file:com.opengamma.analytics.financial.instrument.cash.CashDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; long temp;/*w ww. ja va 2s .c om*/ temp = Double.doubleToLongBits(_accrualFactor); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _currency.hashCode(); result = prime * result + _endDate.hashCode(); temp = Double.doubleToLongBits(_notional); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_rate); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _startDate.hashCode(); return result; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborGearing.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from www . jav a2 s. co m if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final CouponIborGearing other = (CouponIborGearing) obj; if (Double.doubleToLongBits(_factor) != Double.doubleToLongBits(other._factor)) { return false; } if (Double.doubleToLongBits(_fixingAccrualFactor) != Double.doubleToLongBits(other._fixingAccrualFactor)) { return false; } if (Double.doubleToLongBits(_fixingPeriodEndTime) != Double.doubleToLongBits(other._fixingPeriodEndTime)) { return false; } if (Double.doubleToLongBits(_fixingPeriodStartTime) != Double .doubleToLongBits(other._fixingPeriodStartTime)) { return false; } if (!ObjectUtils.equals(_forwardCurveName, other._forwardCurveName)) { return false; } if (!ObjectUtils.equals(_index, other._index)) { return false; } if (Double.doubleToLongBits(_spread) != Double.doubleToLongBits(other._spread)) { return false; } if (Double.doubleToLongBits(_spreadAmount) != Double.doubleToLongBits(other._spreadAmount)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.cash.derivative.Cash.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }// www . ja v a 2 s . c om if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Cash other = (Cash) obj; if (!ObjectUtils.equals(_currency, other._currency)) { return false; } if (!ObjectUtils.equals(_discountingCurveName, other._discountingCurveName)) { return false; } if (Double.doubleToLongBits(_endTime) != Double.doubleToLongBits(other._endTime)) { return false; } if (Double.doubleToLongBits(_rate) != Double.doubleToLongBits(other._rate)) { return false; } if (Double.doubleToLongBits(_notional) != Double.doubleToLongBits(other._notional)) { return false; } if (Double.doubleToLongBits(_startTime) != Double.doubleToLongBits(other._startTime)) { return false; } if (Double.doubleToLongBits(_accrualFactor) != Double.doubleToLongBits(other._accrualFactor)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.instrument.payment.CapFloorCMSSpreadDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w . jav a2 s . c o m if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final CapFloorCMSSpreadDefinition other = (CapFloorCMSSpreadDefinition) obj; if (!ObjectUtils.equals(_cmsIndex1, other._cmsIndex1)) { return false; } if (!ObjectUtils.equals(_cmsIndex2, other._cmsIndex2)) { return false; } if (_isCap != other._isCap) { return false; } if (Double.doubleToLongBits(_strike) != Double.doubleToLongBits(other._strike)) { return false; } if (!ObjectUtils.equals(_underlyingSwap1, other._underlyingSwap1)) { return false; } if (!ObjectUtils.equals(_underlyingSwap2, other._underlyingSwap2)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureSecurity.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from ww w. ja v a2s . c o m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final InterestRateFutureSecurity other = (InterestRateFutureSecurity) obj; if (Double.doubleToLongBits(_fixingPeriodAccrualFactor) != Double .doubleToLongBits(other._fixingPeriodAccrualFactor)) { return false; } if (Double.doubleToLongBits(_fixingPeriodEndTime) != Double.doubleToLongBits(other._fixingPeriodEndTime)) { return false; } if (Double.doubleToLongBits(_fixingPeriodStartTime) != Double .doubleToLongBits(other._fixingPeriodStartTime)) { return false; } if (!ObjectUtils.equals(_forwardCurveName, other._forwardCurveName)) { return false; } if (!ObjectUtils.equals(_discountingCurveName, other._discountingCurveName)) { return false; } if (!ObjectUtils.equals(_iborIndex, other._iborIndex)) { return false; } if (Double.doubleToLongBits(_lastTradingTime) != Double.doubleToLongBits(other._lastTradingTime)) { return false; } if (!ObjectUtils.equals(_name, other._name)) { return false; } if (Double.doubleToLongBits(_notional) != Double.doubleToLongBits(other._notional)) { return false; } if (Double.doubleToLongBits(_paymentAccrualFactor) != Double .doubleToLongBits(other._paymentAccrualFactor)) { return false; } return true; }
From source file:cc.redberry.core.number.Numeric.java
/** * @see Double#equals(java.lang.Object)//from w ww. j av a2 s. com */ @Override public boolean equals(Object obj) { if (obj == null) return false; if (!(obj instanceof Number)) return false; return Double.doubleToLongBits(value) == Double.doubleToLongBits(((Number) obj).doubleValue()); }
From source file:com.opengamma.maths.lowlevelapi.datatypes.primitive.CompressedSparseRowFormatMatrix.java
@Override // again, column slicing CSR is a bad idea and essentially requires multiple brute forces. Store the matrix differently if you are thinking about doing this a lot public double[] getColumnElements(int index) { double[] tmp = new double[_cols]; double val; int ptr = 0;/*from ww w . j av a 2 s .c om*/ for (int i = 0; i < _cols; i++) { val = this.getEntry(i, index); if (Double.doubleToLongBits(val) != 0) { tmp[ptr] = val; ptr++; } } return Arrays.copyOfRange(tmp, 0, ptr); }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CapFloorCMSSpread.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + _cmsIndex1.hashCode(); result = prime * result + _cmsIndex2.hashCode(); result = prime * result + (_isCap ? 1231 : 1237); long temp;//from w w w . j a v a 2s .c o m temp = Double.doubleToLongBits(_settlementTime); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_strike); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _underlyingSwap1.hashCode(); result = prime * result + _underlyingSwap2.hashCode(); return result; }
From source file:com.opengamma.analytics.financial.instrument.bond.BillSecurityDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from ww w. ja v a2 s . c o m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BillSecurityDefinition other = (BillSecurityDefinition) obj; if (!ObjectUtils.equals(_calendar, other._calendar)) { return false; } if (!ObjectUtils.equals(_currency, other._currency)) { return false; } if (!ObjectUtils.equals(_dayCount, other._dayCount)) { return false; } if (!ObjectUtils.equals(_endDate, other._endDate)) { return false; } if (!ObjectUtils.equals(_issuer, other._issuer)) { return false; } if (Double.doubleToLongBits(_notional) != Double.doubleToLongBits(other._notional)) { return false; } if (_settlementDays != other._settlementDays) { return false; } if (!ObjectUtils.equals(_yieldConvention, other._yieldConvention)) { return false; } return true; }