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.interestrate.payments.derivative.CouponOIS.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    long temp;/*www.  ja  v 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 + _index.hashCode();
    temp = Double.doubleToLongBits(_notionalAccrued);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.model.option.definition.ComplexChooserOptionDefinition.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + ((_callExpiry == null) ? 0 : _callExpiry.hashCode());
    long temp;/*from w  w w.  j  a va  2s  . c  o m*/
    temp = Double.doubleToLongBits(_callStrike);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + ((_putExpiry == null) ? 0 : _putExpiry.hashCode());
    temp = Double.doubleToLongBits(_putStrike);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.bond.definition.BondCapitalIndexedSecurity.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    long temp;/*from   www . j a v a  2 s. c o  m*/
    temp = Double.doubleToLongBits(_accruedInterest);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _couponPerYear;
    temp = Double.doubleToLongBits(_factorToNextCoupon);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_indexStartValue);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _settlement.hashCode();
    result = prime * result + _yieldConvention.hashCode();
    return result;
}

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

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    long temp;//ww  w .  j  av a2 s  . c om
    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 + ((_index == null) ? 0 : _index.hashCode());
    temp = Double.doubleToLongBits(_notionalAccrued);
    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.swaption.derivative.SwaptionCashFixedIbor.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//w w w  . jav  a 2s  . c o  m
    if (!super.equals(obj)) {
        return false;
    }
    final SwaptionCashFixedIbor other = (SwaptionCashFixedIbor) obj;
    if (_isLong != other._isLong) {
        return false;
    }
    if (Double.doubleToLongBits(_settlementTime) != Double.doubleToLongBits(other._settlementTime)) {
        return false;
    }
    if (!ObjectUtils.equals(_underlyingSwap, other._underlyingSwap)) {
        return false;
    }
    return true;
}

From source file:com.opengamma.analytics.financial.instrument.future.InterestRateFutureOptionMarginSecurityDefinition.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//www  .  j a va2 s  .  c o m
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final InterestRateFutureOptionMarginSecurityDefinition other = (InterestRateFutureOptionMarginSecurityDefinition) obj;
    if (!ObjectUtils.equals(_expirationDate, other._expirationDate)) {
        return false;
    }
    if (_isCall != other._isCall) {
        return false;
    }
    if (Double.doubleToLongBits(_strike) != Double.doubleToLongBits(other._strike)) {
        return false;
    }
    if (!ObjectUtils.equals(_underlyingFuture, other._underlyingFuture)) {
        return false;
    }
    return true;
}

From source file:com.opengamma.analytics.financial.instrument.future.InterestRateFutureOptionPremiumSecurityDefinition.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*from w  w w. j av a  2s  .  c om*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final InterestRateFutureOptionPremiumSecurityDefinition other = (InterestRateFutureOptionPremiumSecurityDefinition) obj;
    if (!ObjectUtils.equals(_expirationDate, other._expirationDate)) {
        return false;
    }
    if (_isCall != other._isCall) {
        return false;
    }
    if (Double.doubleToLongBits(_strike) != Double.doubleToLongBits(other._strike)) {
        return false;
    }
    if (!ObjectUtils.equals(_underlyingFuture, other._underlyingFuture)) {
        return false;
    }
    return true;
}

From source file:com.act.analysis.surfactant.AtomSplit.java

@Override
public int hashCode() {
    int result;/*from  w w  w.  j a  v a 2 s.c  o  m*/
    long temp;
    result = leftIndices != null ? leftIndices.hashCode() : 0;
    result = 31 * result + (rightIndices != null ? rightIndices.hashCode() : 0);
    temp = Double.doubleToLongBits(leftSum);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(rightSum);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(weightedLeftSum);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(weightedRightSum);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + leftPosCount;
    result = 31 * result + leftNegCount;
    result = 31 * result + rightPosCount;
    result = 31 * result + rightNegCount;
    temp = Double.doubleToLongBits(leftMin);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(leftMax);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(rightMin);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(rightMax);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:de.hsheilbronn.mi.configuration.SvmConfigurationImpl.java

@Override
public int hashCode() {
    int result;//from   www .  j  av a 2 s .  c o m
    long temp;
    result = svmType != null ? svmType.hashCode() : 0;
    result = 31 * result + (kernelType != null ? kernelType.hashCode() : 0);
    result = 31 * result + degree;
    temp = Double.doubleToLongBits(gamma);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(coef0);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(nu);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(cacheSize);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(cost);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(eps);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(p);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + shrinking;
    result = 31 * result + probability;
    result = 31 * result + nrWeight;
    result = 31 * result + crossValidation;
    result = 31 * result + (weightLabel != null ? Arrays.hashCode(weightLabel) : 0);
    result = 31 * result + (weight != null ? Arrays.hashCode(weight) : 0);
    result = 31 * result + nFold;
    return result;
}

From source file:com.opengamma.analytics.financial.instrument.future.DeliverableSwapFuturesSecurityDefinition.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _deliveryDate.hashCode();
    result = prime * result + _lastTradingDate.hashCode();
    long temp;/*from   w  w  w .ja  v a2s.  c  om*/
    temp = Double.doubleToLongBits(_notional);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _underlyingSwap.hashCode();
    return result;
}