List of usage examples for java.lang Double doubleToLongBits
@HotSpotIntrinsicCandidate public static long doubleToLongBits(double value)
From source file:com.opengamma.analytics.financial.commodity.derivative.CommodityForward.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from ww w .jav a2 s.c o m*/ if (obj == null) { return false; } if (!(obj instanceof CommodityForward)) { return false; } final CommodityForward other = (CommodityForward) obj; if (Double.doubleToLongBits(_expiry) != Double.doubleToLongBits(other._expiry)) { return false; } if (!ObjectUtils.equals(_underlying, other._underlying)) { return false; } if (!ObjectUtils.equals(_firstDeliveryDate, other._firstDeliveryDate)) { return false; } if (!ObjectUtils.equals(_lastDeliveryDate, other._lastDeliveryDate)) { return false; } if (!ObjectUtils.equals(_unitName, other._unitName)) { return false; } if (!ObjectUtils.equals(_settlementType, other._settlementType)) { return false; } if (!ObjectUtils.equals(_currency, other._currency)) { return false; } if (Double.compare(_amount, other._amount) != 0) { return false; } if (Double.compare(_unitAmount, other._unitAmount) != 0) { return false; } if (Double.compare(_settlement, other._settlement) != 0) { return false; } if (Double.compare(_referencePrice, other._referencePrice) != 0) { return false; } return true; }
From source file:com.opengamma.analytics.financial.instrument.bond.BillTransactionDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; long temp;/* www . jav a 2 s. c o m*/ temp = Double.doubleToLongBits(_quantity); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_settlementAmount); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _settlementDate.hashCode(); result = prime * result + _underlying.hashCode(); return result; }
From source file:com.mesosphere.dcos.cassandra.common.config.ClusterTaskConfig.java
@Override public int hashCode() { int result;/*from w w w .j a v a2s . c o m*/ long temp; temp = Double.doubleToLongBits(cpus); result = (int) (temp ^ (temp >>> 32)); result = 31 * result + memoryMb; result = 31 * result + diskMb; return result; }
From source file:com.opengamma.analytics.math.matrix.DoubleMatrix2D.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from ww w. j a v a 2 s . c o m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final DoubleMatrix2D other = (DoubleMatrix2D) obj; if (_columns != other._columns) { return false; } if (_rows != other._rows) { return false; } for (int i = 0; i < _rows; i++) { for (int j = 0; j < _columns; j++) { if (Double.doubleToLongBits(_data[i][j]) != Double.doubleToLongBits(other._data[i][j])) { return false; } } } return true; }
From source file:com.opengamma.analytics.financial.instrument.payment.CouponFixedDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w . j av a2 s .co m if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final CouponFixedDefinition other = (CouponFixedDefinition) obj; if (Double.doubleToLongBits(_amount) != Double.doubleToLongBits(other._amount)) { return false; } if (Double.doubleToLongBits(_rate) != Double.doubleToLongBits(other._rate)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponOIS.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//from w w w.j a v a2 s . c o m if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } CouponOIS other = (CouponOIS) 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(_index, other._index)) { return false; } if (Double.doubleToLongBits(_notionalAccrued) != Double.doubleToLongBits(other._notionalAccrued)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationZeroCouponInterpolationGearing.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp;//from ww w . jav a2s .c o m temp = Double.doubleToLongBits(_factor); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_fixingEndTime); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_indexStartValue); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + (_payNotional ? 1231 : 1237); result = prime * result + Arrays.hashCode(_referenceEndTime); temp = Double.doubleToLongBits(_weight); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.interestrate.bond.definition.BondCapitalIndexedSecurity.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from w w w . j a v a 2 s. c o m*/ if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final BondCapitalIndexedSecurity<?> other = (BondCapitalIndexedSecurity<?>) obj; if (Double.doubleToLongBits(_accruedInterest) != Double.doubleToLongBits(other._accruedInterest)) { return false; } if (_couponPerYear != other._couponPerYear) { return false; } if (Double.doubleToLongBits(_factorToNextCoupon) != Double.doubleToLongBits(other._factorToNextCoupon)) { return false; } if (Double.doubleToLongBits(_indexStartValue) != Double.doubleToLongBits(other._indexStartValue)) { return false; } if (!ObjectUtils.equals(_settlement, other._settlement)) { return false; } if (!ObjectUtils.equals(_yieldConvention, other._yieldConvention)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.instrument.bond.BondTransactionDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/* w ww.j a v a 2s . c om*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BondTransactionDefinition<?, ?> other = (BondTransactionDefinition<?, ?>) obj; if (Double.doubleToLongBits(_price) != Double.doubleToLongBits(other._price)) { return false; } if (Double.doubleToLongBits(_quantity) != Double.doubleToLongBits(other._quantity)) { return false; } if (!ObjectUtils.equals(_settlementDate, other._settlementDate)) { return false; } if (!ObjectUtils.equals(_underlyingBond, other._underlyingBond)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.commodity.derivative.CommodityFuture.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }// w w w . ja va2 s . co m if (obj == null) { return false; } if (!(obj instanceof CommodityFuture)) { return false; } final CommodityFuture other = (CommodityFuture) obj; if (Double.doubleToLongBits(_expiry) != Double.doubleToLongBits(other._expiry)) { return false; } if (!ObjectUtils.equals(_underlying, other._underlying)) { return false; } if (!ObjectUtils.equals(_firstDeliveryDate, other._firstDeliveryDate)) { return false; } if (!ObjectUtils.equals(_lastDeliveryDate, other._lastDeliveryDate)) { return false; } if (!ObjectUtils.equals(_unitName, other._unitName)) { return false; } if (!ObjectUtils.equals(_settlementType, other._settlementType)) { return false; } if (!ObjectUtils.equals(_currency, other._currency)) { return false; } if (Double.compare(_amount, other._amount) != 0) { return false; } if (Double.compare(_settlement, other._settlement) != 0) { return false; } if (Double.compare(_referencePrice, other._referencePrice) != 0) { return false; } return true; }