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.cash.derivative.Cash.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _currency.hashCode();
    result = prime * result + (_discountingCurveName == null ? 0 : _discountingCurveName.hashCode());
    long temp;//from  www.  j a v  a 2  s. co m
    temp = Double.doubleToLongBits(_endTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_rate);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_notional);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_startTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_accrualFactor);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

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

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//from ww  w. j av a 2s .  co  m
    if (!super.equals(obj)) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final CouponIborCompoundingSpread other = (CouponIborCompoundingSpread) 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(_index, other._index)) {
        return false;
    }
    if (Double.doubleToLongBits(_notionalAccrued) != Double.doubleToLongBits(other._notionalAccrued)) {
        return false;
    }
    if (!Arrays.equals(_paymentAccrualFactors, other._paymentAccrualFactors)) {
        return false;
    }
    if (Double.doubleToLongBits(_spread) != Double.doubleToLongBits(other._spread)) {
        return false;
    }
    return true;
}

From source file:org.jfree.experimental.chart.plot.dial.DialTextAnnotation.java

/**
 * Returns a hash code for this instance.
 * //www . j  av  a  2 s.  c  om
 * @return The hash code.
 */
public int hashCode() {
    int result = 193;
    result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
    result = 37 * result + this.font.hashCode();
    result = 37 * result + this.label.hashCode();
    result = 37 * result + this.anchor.hashCode();
    long temp = Double.doubleToLongBits(this.angle);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.radius);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.instrument.payment.CapFloorCMSSpreadDefinition.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  .  ja v a 2  s.c  om*/
    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:it_minds.dk.eindberetningmobil_android.models.DrivingReport.java

@Override
public int hashCode() {
    int result;//from   ww w .j  a  v a  2s  .  c om
    long tempdistanceInMeters;
    long temphomeToBorderDistance;
    result = 1;
    result = 31 * result + (purpose != null ? purpose.hashCode() : 0);
    result = 31 * result + (orgLocation != null ? orgLocation.hashCode() : 0);
    result = 31 * result + (Rate != null ? Rate.hashCode() : 0);
    result = 31 * result + (extraDescription != null ? extraDescription.hashCode() : 0);
    result = 31 * result + (haveEditedDistance ? 1 : 0);
    result = 31 * result + (startedAtHome ? 1 : 0);
    result = 31 * result + (endedAtHome ? 1 : 0);
    result = 31 * result + (fourKMRule ? 1 : 0);
    result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
    result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
    tempdistanceInMeters = Double.doubleToLongBits(distanceInMeters);
    result = 31 * result + (int) (tempdistanceInMeters ^ (tempdistanceInMeters >>> 32));
    temphomeToBorderDistance = Double.doubleToLongBits(homeToBorderDistance);
    result = 31 * result + (int) (temphomeToBorderDistance ^ (temphomeToBorderDistance >>> 32));
    result = 31 * result + (gpsPoints != null ? gpsPoints.hashCode() : 0);
    return result;
}

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

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//from  w  w w  .j av a  2 s.c  o  m
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final BillSecurity other = (BillSecurity) obj;
    if (Double.doubleToLongBits(_accrualFactor) != Double.doubleToLongBits(other._accrualFactor)) {
        return false;
    }
    if (!ObjectUtils.equals(_creditCurveName, other._creditCurveName)) {
        return false;
    }
    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 (_issuer == null) {
        if (other._issuer != null) {
            return false;
        }
    } else if (!_issuer.equals(other._issuer)) {
        return false;
    }
    if (Double.doubleToLongBits(_notional) != Double.doubleToLongBits(other._notional)) {
        return false;
    }
    if (Double.doubleToLongBits(_settlementTime) != Double.doubleToLongBits(other._settlementTime)) {
        return false;
    }
    if (!ObjectUtils.equals(_yieldConvention, other._yieldConvention)) {
        return false;
    }
    return true;
}

From source file:be.ceau.chart.color.Color.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*ww w. ja  v a  2s .  c  o m*/
    temp = Double.doubleToLongBits(alpha);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + b;
    result = prime * result + g;
    result = prime * result + r;
    return result;
}

From source file:com.opengamma.analytics.financial.instrument.bond.BillSecurityDefinition.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _calendar.hashCode();
    result = prime * result + _currency.hashCode();
    result = prime * result + _dayCount.hashCode();
    result = prime * result + _endDate.hashCode();
    result = prime * result + _issuer.hashCode();
    long temp;/*from  w  w  w.j ava  2s.  c  o m*/
    temp = Double.doubleToLongBits(_notional);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _settlementDays;
    result = prime * result + _yieldConvention.hashCode();
    return result;
}

From source file:org.jfree.experimental.chart.plot.dial.StandardDialRange.java

/**
 * Returns a hash code for this instance.
 * //w w w .j a v  a2 s  .c o  m
 * @return The hash code.
 */
public int hashCode() {
    int result = 193;
    long temp = Double.doubleToLongBits(this.increment);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.lowerBound);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.upperBound);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.innerRadius);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.outerRadius);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
    return result;
}

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

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/* w  w w .j  a  v  a 2 s  .com*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final InterestRateFutureTransaction other = (InterestRateFutureTransaction) obj;
    if (_quantity != other._quantity) {
        return false;
    }
    if (Double.doubleToLongBits(_referencePrice) != Double.doubleToLongBits(other._referencePrice)) {
        return false;
    }
    if (!ObjectUtils.equals(_underlying, other._underlying)) {
        return false;
    }
    return true;
}