Example usage for java.lang Double doubleToLongBits

List of usage examples for java.lang Double doubleToLongBits

Introduction

In this page you can find the example usage for java.lang Double doubleToLongBits.

Prototype

@HotSpotIntrinsicCandidate
public static long doubleToLongBits(double value) 

Source Link

Document

Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

Usage

From source file:com.opengamma.analytics.financial.instrument.payment.CouponIborSpreadDefinition.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*from   w  ww.j a  v a 2 s .  com*/
    if (!super.equals(obj)) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final CouponIborSpreadDefinition other = (CouponIborSpreadDefinition) obj;
    if (Double.doubleToLongBits(_fixingPeriodAccrualFactor) != Double
            .doubleToLongBits(other._fixingPeriodAccrualFactor)) {
        return false;
    }
    if (!ObjectUtils.equals(_fixingPeriodEndDate, other._fixingPeriodEndDate)) {
        return false;
    }
    if (!ObjectUtils.equals(_fixingPeriodStartDate, other._fixingPeriodStartDate)) {
        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.model.volatility.BlackFormula.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;//  w  w  w.j  av a 2 s .com
    temp = Double.doubleToLongBits(_expiry);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_forward);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + ((_fwdMtm == null) ? 0 : _fwdMtm.hashCode());
    result = prime * result + (_isCall ? 1231 : 1237);
    result = prime * result + ((_lognormalVol == null) ? 0 : _lognormalVol.hashCode());
    temp = Double.doubleToLongBits(_strike);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.eTilbudsavis.etasdk.model.Store.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((mBranding == null) ? 0 : mBranding.hashCode());
    result = prime * result + ((mCity == null) ? 0 : mCity.hashCode());
    result = prime * result + ((mContact == null) ? 0 : mContact.hashCode());
    result = prime * result + ((mCountry == null) ? 0 : mCountry.hashCode());
    result = prime * result + ((mDealer == null) ? 0 : mDealer.hashCode());
    result = prime * result + ((mDealerId == null) ? 0 : mDealerId.hashCode());
    result = prime * result + ((mDealerUrl == null) ? 0 : mDealerUrl.hashCode());
    result = prime * result + ((mErn == null) ? 0 : mErn.hashCode());
    long temp;//  w  w  w  . j  av a2  s . c  o  m
    temp = Double.doubleToLongBits(mLatitude);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(mLongitude);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + ((mStreet == null) ? 0 : mStreet.hashCode());
    result = prime * result + ((mZipcode == null) ? 0 : mZipcode.hashCode());
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureSecurity.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;//from  w  ww .  ja v a 2 s.  com
    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 == null ? 0 : _forwardCurveName.hashCode());
    result = prime * result + (_discountingCurveName == null ? 0 : _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.CouponIborGearing.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    long temp;// w ww  .  j  a  v a2  s  .  c  o m
    temp = Double.doubleToLongBits(_factor);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_fixingAccrualFactor);
    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 == null ? 0 : _forwardCurveName.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));
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureTransaction.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _quantity;
    long temp;/*from   w w  w  .j a  v a2 s .c  om*/
    temp = Double.doubleToLongBits(_referencePrice);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _underlying.hashCode();
    return result;
}

From source file:com.opengamma.analytics.financial.instrument.payment.CouponArithmeticAverageONSpreadSimplifiedDefinition.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + _index.hashCode();
    long temp;/*from   ww  w . j  a v a 2  s  .c  o  m*/
    temp = Double.doubleToLongBits(_spread);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_spreadAmount);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborCompounded.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from w  ww. ja  v  a2 s.  c  o m*/
    if (!super.equals(obj)) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    CouponIborCompounded other = (CouponIborCompounded) obj;
    if (!Arrays.equals(_fixingPeriodAccrualFactors, other._fixingPeriodAccrualFactors)) {
        return false;
    }
    if (!Arrays.equals(_fixingPeriodEndTimes, other._fixingPeriodEndTimes)) {
        return false;
    }
    if (!Arrays.equals(_fixingPeriodStartTimes, other._fixingPeriodStartTimes)) {
        return false;
    }
    if (!Arrays.equals(_fixingTimes, other._fixingTimes)) {
        return false;
    }
    if (!ObjectUtils.equals(_forwardCurveName, other._forwardCurveName)) {
        return false;
    }
    if (!ObjectUtils.equals(_index, other._index)) {
        return false;
    }
    if (Double.doubleToLongBits(_notionalAccrued) != Double.doubleToLongBits(other._notionalAccrued)) {
        return false;
    }
    if (!Arrays.equals(_paymentAccrualFactors, other._paymentAccrualFactors)) {
        return false;
    }
    return true;
}

From source file:com.opengamma.analytics.financial.interestrate.future.derivative.FederalFundsFutureSecurity.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*w ww  . j  ava2  s. c  o  m*/
    temp = Double.doubleToLongBits(_accruedInterest);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + Arrays.hashCode(_fixingPeriodAccrualFactor);
    result = prime * result + Arrays.hashCode(_fixingPeriodTime);
    result = prime * result + _index.hashCode();
    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.math.interpolation.data.Interpolator1DCubicSplineDataBundle.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*from w  w  w . j  a  v a2s  . c o m*/
    temp = Double.doubleToLongBits(_leftFirstDev);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + 1237;
    temp = Double.doubleToLongBits(_rightFirstDev);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + 1237;
    result = prime * result + ((_underlyingData == null) ? 0 : _underlyingData.hashCode());
    return result;
}