List of usage examples for java.lang Double doubleToLongBits
@HotSpotIntrinsicCandidate public static long doubleToLongBits(double value)
From source file:com.inform.jamps.solver.gurobi.GurobiExpression.java
@Override public final boolean equals(final Object obj) { if (this == obj) { return true; }/*from ww w . jav a 2 s . c o m*/ if (obj == null) { return false; } if (!(obj instanceof GurobiExpression)) { return false; } final GurobiExpression other = (GurobiExpression) obj; if (Double.doubleToLongBits(constant) != Double.doubleToLongBits(other.constant)) { return false; } return linearTerms.equals(other.linearTerms); }
From source file:com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFuture.java
@Override public int hashCode() { final int prime = 31; int result = 1; long temp;//from w w w. j av a2s.c o m temp = Double.doubleToLongBits(_fixingPeriodAccrualFactor); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_fixingPeriodEndTime); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_fixingPeriodStartTime); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _forwardCurveName.hashCode(); result = prime * result + _discountingCurveName.hashCode(); result = prime * result + _iborIndex.hashCode(); temp = Double.doubleToLongBits(_lastTradingTime); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _name.hashCode(); temp = Double.doubleToLongBits(_notional); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_paymentAccrualFactor); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CapFloorCMS.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from w w w .jav a2 s. co m*/ if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final CapFloorCMS other = (CapFloorCMS) obj; if (_isCap != other._isCap) { return false; } if (Double.doubleToLongBits(_settlementTime) != Double.doubleToLongBits(other._settlementTime)) { return false; } if (Double.doubleToLongBits(_strike) != Double.doubleToLongBits(other._strike)) { return false; } if (!ObjectUtils.equals(_underlyingSwap, other._underlyingSwap)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIbor.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp;/*from ww w .j av a 2 s .c o m*/ temp = Double.doubleToLongBits(_fixingPeriodEndTime); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(_fixingPeriodStartTime); result = prime * result + (int) (temp ^ temp >>> 32); temp = Double.doubleToLongBits(_fixingAccrualFactor); result = prime * result + (int) (temp ^ temp >>> 32); result = prime * result + (_forwardCurveName == null ? 0 : _forwardCurveName.hashCode()); return result; }
From source file:com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationZeroCouponInterpolationGearing.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from w ww .j a va 2 s . c o m*/ if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } CouponInflationZeroCouponInterpolationGearing other = (CouponInflationZeroCouponInterpolationGearing) obj; if (Double.doubleToLongBits(_factor) != Double.doubleToLongBits(other._factor)) { return false; } if (Double.doubleToLongBits(_fixingEndTime) != Double.doubleToLongBits(other._fixingEndTime)) { return false; } if (Double.doubleToLongBits(_indexStartValue) != Double.doubleToLongBits(other._indexStartValue)) { return false; } if (_payNotional != other._payNotional) { return false; } if (!Arrays.equals(_referenceEndTime, other._referenceEndTime)) { return false; } if (Double.doubleToLongBits(_weight) != Double.doubleToLongBits(other._weight)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.future.derivative.BondFuture.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*www .j a va2 s . co m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } BondFuture other = (BondFuture) obj; if (!Arrays.equals(_conversionFactor, other._conversionFactor)) { return false; } if (!Arrays.equals(_deliveryBasket, other._deliveryBasket)) { return false; } if (Double.doubleToLongBits(_deliveryFirstTime) != Double.doubleToLongBits(other._deliveryFirstTime)) { return false; } if (Double.doubleToLongBits(_deliveryLastTime) != Double.doubleToLongBits(other._deliveryLastTime)) { return false; } if (Double.doubleToLongBits(_noticeFirstTime) != Double.doubleToLongBits(other._noticeFirstTime)) { return false; } if (Double.doubleToLongBits(_noticeLastTime) != Double.doubleToLongBits(other._noticeLastTime)) { return false; } if (Double.doubleToLongBits(_notional) != Double.doubleToLongBits(other._notional)) { return false; } if (Double.doubleToLongBits(_tradingLastTime) != Double.doubleToLongBits(other._tradingLastTime)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.model.interestrate.curve.ForwardCurve.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _drift.hashCode(); result = prime * result + _fwdCurve.hashCode(); long temp;/*from w ww. j a v a2 s. co m*/ temp = Double.doubleToLongBits(_spot); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.commodity.definition.CommodityForwardDefinition.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 ww. jav a2 s . co 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)); 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.util.money.CurrencyAmount.java
/** * Checks if this amount equals another amount. * <p>/* ww w .j a v a 2 s . com*/ * The comparison checks the currency and amount. * * @param obj the other amount, null returns false * @return true if equal */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof CurrencyAmount) { CurrencyAmount other = (CurrencyAmount) obj; return _currency.equals(other._currency) && Double.doubleToLongBits(_amount) == Double.doubleToLongBits(other._amount); } return false; }
From source file:com.opengamma.analytics.financial.instrument.payment.CouponOISSimplifiedDefinition.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp;// w w w . ja v a 2 s . c o m 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(); return result; }