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:net.sf.jclal.util.random.Ranmar.java

@Override
public int hashCode() {
    int hash = 3;
    hash = 23 * hash + this.i97;
    hash = 23 * hash + this.j97;
    hash = 23 * hash + (int) (Double.doubleToLongBits(this.c) ^ (Double.doubleToLongBits(this.c) >>> 32));
    hash = 23 * hash + Arrays.hashCode(this.u);
    return hash;/*from  ww  w .j  a v  a2 s  .  c  o m*/
}

From source file:com.hpcloud.mon.common.model.alarm.AlarmSubExpression.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((function == null) ? 0 : function.hashCode());
    result = prime * result + ((metricDefinition == null) ? 0 : metricDefinition.hashCode());
    result = prime * result + ((operator == null) ? 0 : operator.hashCode());
    result = prime * result + period;/*from  w w w  .  j a  v a2  s . co m*/
    result = prime * result + periods;
    long temp;
    temp = Double.doubleToLongBits(threshold);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.pgmacdesign.rsrtoolbox.TEST.java

double getDouble(final SharedPreferences prefs, final String key, final double defaultValue) {
    return Double.longBitsToDouble(prefs.getLong(key, Double.doubleToLongBits(defaultValue)));
}

From source file:com.inform.jamps.solver.gurobi.GurobiVariable.java

@Override
public final boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//from w  ww . ja va  2s.  c o  m
    if (obj == null) {
        return false;
    }
    if (!(obj instanceof GurobiVariable)) {
        return false;
    }
    final GurobiVariable other = (GurobiVariable) obj;
    if (!name.equals(other.name)) {
        return false;
    }
    if (type != other.type) {
        return false;
    }
    if (Double.doubleToLongBits(lowerBound) != Double.doubleToLongBits(other.lowerBound)) {
        return false;
    }
    return Double.doubleToLongBits(upperBound) == Double.doubleToLongBits(other.upperBound);
}

From source file:gsn.beans.AddressBean.java

public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    AddressBean other = (AddressBean) obj;
    if (Double.doubleToLongBits(random) != Double.doubleToLongBits(other.random))
        return false;
    return true;//from w ww.j a  va2 s  .c om
}

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

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    long temp;/*  w  w w  .  j  av a2 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));
    result = prime * result + ((_settlement == null) ? 0 : _settlement.hashCode());
    result = prime * result + ((_yieldConvention == null) ? 0 : _yieldConvention.hashCode());
    return result;
}

From source file:io.fouad.jtb.core.beans.InlineQueryResultLocation.java

@Override
public int hashCode() {
    int result = super.hashCode();
    long temp;/*from   w w  w.  java 2  s. c  o m*/
    temp = Double.doubleToLongBits(latitude);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(longitude);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + (title != null ? title.hashCode() : 0);
    result = 31 * result + (inputMessageContent != null ? inputMessageContent.hashCode() : 0);
    result = 31 * result + (thumbUrl != null ? thumbUrl.hashCode() : 0);
    result = 31 * result + (thumbWidth != null ? thumbWidth.hashCode() : 0);
    result = 31 * result + (thumbHeight != null ? thumbHeight.hashCode() : 0);
    return result;
}

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

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

From source file:com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionCashFixedCompoundedONCompounded.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + (_isLong ? 1231 : 1237);
    long temp;// ww w.jav a2  s.  com
    temp = Double.doubleToLongBits(_settlementTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _underlyingSwap.hashCode();
    return result;
}

From source file:com.opengamma.analytics.financial.equity.option.EquityIndexOption.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _currency.hashCode();
    result = prime * result + _exerciseType.hashCode();
    result = prime * result + (_isCall ? 1231 : 1237);
    result = prime * result + _settlementType.hashCode();
    long temp;//from ww w . jav  a  2 s.com
    temp = Double.doubleToLongBits(_strike);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_timeToExpiry);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_timeToSettlement);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_unitAmount);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}