类java.lang.Double源码实例Demo

下面列出了怎么用java.lang.Double的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: xDrip   文件: BgReadingMessage.java
public BgReadingMessage(Long timestamp, Double time_since_sensor_started, Double raw_data, Double filtered_data, Double age_adjusted_raw_value, Boolean calibration_flag, Double calculated_value, Double filtered_calculated_value, Double calculated_value_slope, Double a, Double b, Double c, Double ra, Double rb, Double rc, String uuid, String calibration_uuid, String sensor_uuid, Boolean ignoreforstats, Double raw_calculated, Boolean hide_slope, String noise, ByteString unknownFields) {
  super(ADAPTER, unknownFields);
  this.timestamp = timestamp;
  this.time_since_sensor_started = time_since_sensor_started;
  this.raw_data = raw_data;
  this.filtered_data = filtered_data;
  this.age_adjusted_raw_value = age_adjusted_raw_value;
  this.calibration_flag = calibration_flag;
  this.calculated_value = calculated_value;
  this.filtered_calculated_value = filtered_calculated_value;
  this.calculated_value_slope = calculated_value_slope;
  this.a = a;
  this.b = b;
  this.c = c;
  this.ra = ra;
  this.rb = rb;
  this.rc = rc;
  this.uuid = uuid;
  this.calibration_uuid = calibration_uuid;
  this.sensor_uuid = sensor_uuid;
  this.ignoreforstats = ignoreforstats;
  this.raw_calculated = raw_calculated;
  this.hide_slope = hide_slope;
  this.noise = noise;
}
 
源代码2 项目: apollo-android   文件: ColorInput.java
@Override
public int hashCode() {
  if (!$hashCodeMemoized) {
    int h = 1;
    h *= 1000003;
    h ^= red;
    h *= 1000003;
    h ^= green.hashCode();
    h *= 1000003;
    h ^= Double.valueOf(blue).hashCode();
    h *= 1000003;
    h ^= enumWithDefaultValue.hashCode();
    h *= 1000003;
    h ^= reviewRefInput.hashCode();
    $hashCode = h;
    $hashCodeMemoized = true;
  }
  return $hashCode;
}
 
源代码3 项目: apollo-android   文件: ColorInput.java
@Override
public int hashCode() {
  if (!$hashCodeMemoized) {
    int h = 1;
    h *= 1000003;
    h ^= red;
    h *= 1000003;
    h ^= green.hashCode();
    h *= 1000003;
    h ^= Double.valueOf(blue).hashCode();
    h *= 1000003;
    h ^= enumWithDefaultValue.hashCode();
    h *= 1000003;
    h ^= reviewRefInput.hashCode();
    $hashCode = h;
    $hashCodeMemoized = true;
  }
  return $hashCode;
}
 
源代码4 项目: epoxy   文件: AllTypesModelViewModel_.java
@Override
public int hashCode() {
  int _result = super.hashCode();
  _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
  long temp;
  _result = 31 * _result + (booleanValue_Boolean ? 1 : 0);
  _result = 31 * _result + (boxedBooleanValue_Boolean != null ? boxedBooleanValue_Boolean.hashCode() : 0);
  _result = 31 * _result + (charSequenceValue_CharSequence != null ? charSequenceValue_CharSequence.hashCode() : 0);
  _result = 31 * _result + (boxedDoubleValue_Double != null ? boxedDoubleValue_Double.hashCode() : 0);
  temp = Double.doubleToLongBits(doubleValue_Double);
  _result = 31 * _result + (int) (temp ^ (temp >>> 32));
  _result = 31 * _result + drawableRes_Int;
  _result = 31 * _result + (epoxyModelList_List != null ? epoxyModelList_List.hashCode() : 0);
  _result = 31 * _result + intValue_Int;
  _result = 31 * _result + (boxedIntValue_Integer != null ? boxedIntValue_Integer.hashCode() : 0);
  _result = 31 * _result + (int) (longValue_Long ^ (longValue_Long >>> 32));
  _result = 31 * _result + (boxedLongValue_Long != null ? boxedLongValue_Long.hashCode() : 0);
  _result = 31 * _result + (onClickListener_OnClickListener != null ? 1 : 0);
  _result = 31 * _result + rawRes_Int;
  _result = 31 * _result + (stringValue_String != null ? stringValue_String.hashCode() : 0);
  _result = 31 * _result + (stringList_List != null ? stringList_List.hashCode() : 0);
  return _result;
}
 
源代码5 项目: apollo-android   文件: TestQuery.java
@Override
public HeroWithReview map(ResponseReader reader) {
  final String __typename = reader.readString($responseFields[0]);
  final String name = reader.readString($responseFields[1]);
  final Double height = reader.readDouble($responseFields[2]);
  return new HeroWithReview(__typename, name, height);
}
 
源代码6 项目: apollo-android   文件: TestQuery.java
@Override
public AsHuman map(ResponseReader reader) {
  final String __typename = reader.readString($responseFields[0]);
  final String name = reader.readString($responseFields[1]);
  final Double height = reader.readDouble($responseFields[2]);
  return new AsHuman(__typename, name, height);
}
 
/**
 * {@inheritDoc}
 */
@Override
@NonNull
public BoxedTypesMethodsFactoryMethod mapFromCursor(@NonNull StorIOContentResolver storIOContentResolver, @NonNull Cursor cursor) {

    Boolean field1 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
        field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    }
    Short field2 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
        field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    }
    Integer field3 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
        field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    }
    Long field4 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
        field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    }
    Float field5 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
        field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    }
    Double field6 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
        field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    }

    BoxedTypesMethodsFactoryMethod object = BoxedTypesMethodsFactoryMethod.create(field1, field2, field3, field4, field5, field6);

    return object;
}
 
源代码8 项目: ml-models   文件: LRModel.java
void add(List<Double> given, double expected, String type, Log log) {
    switch(type) {
        case "train": addTrain(given, expected, log); break;
        case "test": addTest(given, expected, log); break;
        default: throw new IllegalArgumentException("Cannot add data of unrecognized type: " + type);
    }
}
 
源代码9 项目: ml-models   文件: LRModel.java
void addMany(List<List<Double>> given, List<Double> expected, String type, Log log) {
    if (given.size() != expected.size())
        throw new IllegalArgumentException("Length of given does not match length of expected.");
    switch(type) {
        case "train":
            for (int i = 0; i < given.size(); i++) addTrain(given.get(i), expected.get(i), log);
            break;
        case "test":
            for (int i = 0; i < given.size(); i++) addTest(given.get(i), expected.get(i), log);
            break;
        default:
            throw new IllegalArgumentException("Cannot add data of unrecognized type: " + type);
    }
}
 
源代码10 项目: ml-models   文件: LRModel.java
void remove(List<Double> given, double expected, String type, Log log) {
    switch(type) {
        case "train": removeTrain(given, expected, log); break;
        case "test": removeTest(given, expected, log); break;
        default: throw new IllegalArgumentException("Cannot remove data of unrecognized type: " + type);
    }
}
 
源代码11 项目: ml-models   文件: LRModel.java
void removeMany(List<List<Double>> given, List<Double> expected, String type, Log log) {
    if (given.size() != expected.size())
        throw new IllegalArgumentException("Length of given does not match length of expected.");
    switch(type) {
        case "train":
            for (int i = 0; i < given.size(); i++) removeTrain(given.get(i), expected.get(i), log);
            break;
        case "test":
            for (int i = 0; i < given.size(); i++) removeTest(given.get(i), expected.get(i), log);
            break;
        default:
            throw new IllegalArgumentException("Cannot add data of unrecognized type: " + type);
    }
}
 
/**
 * {@inheritDoc}
 */
@Override
@NonNull
public BoxedTypesPrivateFieldsIgnoreNull mapFromCursor(@NonNull StorIOContentResolver storIOContentResolver, @NonNull Cursor cursor) {

    Boolean field1 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
        field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    }
    Short field2 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
        field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    }
    Integer field3 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
        field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    }
    Long field4 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
        field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    }
    Float field5 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
        field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    }
    Double field6 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
        field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    }

    BoxedTypesPrivateFieldsIgnoreNull object = new BoxedTypesPrivateFieldsIgnoreNull(field1, field2, field3, field4, field5, field6);

    return object;
}
 
/**
 * {@inheritDoc}
 */
@Override
@NonNull
public BoxedTypesMethodsFactoryMethodIgnoreNull mapFromCursor(@NonNull StorIOSQLite storIOSQLite, @NonNull Cursor cursor) {

    Boolean field1 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
        field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    }
    Short field2 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
        field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    }
    Integer field3 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
        field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    }
    Long field4 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
        field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    }
    Float field5 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
        field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    }
    Double field6 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
        field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    }

    BoxedTypesMethodsFactoryMethodIgnoreNull object = BoxedTypesMethodsFactoryMethodIgnoreNull.create(field1, field2, field3, field4, field5, field6);

    return object;
}
 
源代码14 项目: dataenum   文件: ConflictingFieldNames.java
@Override
public int hashCode() {
  int result = 0;
  result = result * 31 + Integer.valueOf(this.result).hashCode();
  result = result * 31 + this.builder.hashCode();
  result = result * 31 + this.param3.hashCode();
  return result * 31 + Double.valueOf(this.param4).hashCode();
}
 
源代码15 项目: dataenum   文件: EfficientEquals.java
@Override
public int hashCode() {
  int result = 0;
  result = result * 31 + Integer.valueOf(this.param1).hashCode();
  result = result * 31 + this.param2.hashCode();
  result = result * 31 + this.param3.hashCode();
  return result * 31 + Double.valueOf(this.param4).hashCode();
}
 
源代码16 项目: dataenum   文件: PrimitiveValue.java
@Override
public int hashCode() {
  int result = 0;
  result = result * 31 + Integer.valueOf(this.param1).hashCode();
  result = result * 31 + Boolean.valueOf(this.param2).hashCode();
  result = result * 31 + Float.valueOf(this.param3).hashCode();
  return result * 31 + Double.valueOf(this.param4).hashCode();
}
 
源代码17 项目: apollo-android   文件: ColorInput.java
@Override
public boolean equals(Object o) {
  if (o == this) {
    return true;
  }
  if (o instanceof ColorInput) {
    ColorInput that = (ColorInput) o;
    return this.red == that.red
     && this.green.equals(that.green)
     && Double.doubleToLongBits(this.blue) == Double.doubleToLongBits(that.blue)
     && this.enumWithDefaultValue.equals(that.enumWithDefaultValue)
     && this.reviewRefInput.equals(that.reviewRefInput);
  }
  return false;
}
 
/**
 * {@inheritDoc}
 */
@Override
@NonNull
public BoxedTypesPrivateFieldsIgnoreNull mapFromCursor(@NonNull StorIOSQLite storIOSQLite, @NonNull Cursor cursor) {

    Boolean field1 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
        field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    }
    Short field2 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
        field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    }
    Integer field3 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
        field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    }
    Long field4 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
        field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    }
    Float field5 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
        field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    }
    Double field6 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
        field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    }

    BoxedTypesPrivateFieldsIgnoreNull object = new BoxedTypesPrivateFieldsIgnoreNull(field1, field2, field3, field4, field5, field6);

    return object;
}
 
源代码19 项目: xDrip   文件: BloodTestMessage.java
public BloodTestMessage(Long timestamp, Double mgdl, Long created_timestamp, Long state, String source, String uuid, ByteString unknownFields) {
  super(ADAPTER, unknownFields);
  this.timestamp = timestamp;
  this.mgdl = mgdl;
  this.created_timestamp = created_timestamp;
  this.state = state;
  this.source = source;
  this.uuid = uuid;
}
 
源代码20 项目: apollo-android   文件: ColorInput.java
ColorInput(int red, Input<Double> green, double blue, Input<Episode> enumWithDefaultValue,
    Input<ReviewRefInput> reviewRefInput) {
  this.red = red;
  this.green = green;
  this.blue = blue;
  this.enumWithDefaultValue = enumWithDefaultValue;
  this.reviewRefInput = reviewRefInput;
}
 
源代码21 项目: apollo-android   文件: HumanDetails.java
@Override
public HumanDetails map(ResponseReader reader) {
  final String __typename = reader.readString($responseFields[0]);
  final String name = reader.readString($responseFields[1]);
  final Double height = reader.readDouble($responseFields[2]);
  return new HumanDetails(__typename, name, height);
}
 
源代码22 项目: apollo-android   文件: ColorInput.java
ColorInput(int red, Input<Double> green, double blue, Input<Episode> enumWithDefaultValue,
    Input<ReviewRefInput> reviewRefInput) {
  this.red = red;
  this.green = green;
  this.blue = blue;
  this.enumWithDefaultValue = enumWithDefaultValue;
  this.reviewRefInput = reviewRefInput;
}
 
源代码23 项目: epoxy   文件: ModelWithAllFieldTypes_.java
@Override
public int hashCode() {
  int _result = super.hashCode();
  _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
  long temp;
  _result = 31 * _result + valueInt;
  _result = 31 * _result + (valueInteger != null ? valueInteger.hashCode() : 0);
  _result = 31 * _result + valueShort;
  _result = 31 * _result + (valueShortWrapper != null ? valueShortWrapper.hashCode() : 0);
  _result = 31 * _result + valueChar;
  _result = 31 * _result + (valueCharacter != null ? valueCharacter.hashCode() : 0);
  _result = 31 * _result + valuebByte;
  _result = 31 * _result + (valueByteWrapper != null ? valueByteWrapper.hashCode() : 0);
  _result = 31 * _result + (int) (valueLong ^ (valueLong >>> 32));
  _result = 31 * _result + (valueLongWrapper != null ? valueLongWrapper.hashCode() : 0);
  temp = Double.doubleToLongBits(valueDouble);
  _result = 31 * _result + (int) (temp ^ (temp >>> 32));
  _result = 31 * _result + (valueDoubleWrapper != null ? valueDoubleWrapper.hashCode() : 0);
  _result = 31 * _result + (valueFloat != +0.0f ? Float.floatToIntBits(valueFloat) : 0);
  _result = 31 * _result + (valueFloatWrapper != null ? valueFloatWrapper.hashCode() : 0);
  _result = 31 * _result + (valueBoolean ? 1 : 0);
  _result = 31 * _result + (valueBooleanWrapper != null ? valueBooleanWrapper.hashCode() : 0);
  _result = 31 * _result + Arrays.hashCode(valueIntArray);
  _result = 31 * _result + Arrays.hashCode(valueObjectArray);
  _result = 31 * _result + (valueString != null ? valueString.hashCode() : 0);
  _result = 31 * _result + (valueObject != null ? valueObject.hashCode() : 0);
  _result = 31 * _result + (valueList != null ? valueList.hashCode() : 0);
  return _result;
}
 
源代码24 项目: j2objc   文件: MaxFloatingPointTest.java
public void testDoubleStringParsing() {
  Double.parseDouble("9223372036854775804");
  Double.parseDouble("9223372036854775805");
  Double.parseDouble("9223372036854775806");
  Double.parseDouble("9223372036854775807");
  assertEquals(Long.MAX_VALUE, (long) Double.parseDouble(MAX_LONG_AS_STRING));
}
 
源代码25 项目: epoxy   文件: ModelWithAllPrivateFieldTypes_.java
@Override
public int hashCode() {
  int _result = super.hashCode();
  _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0);
  _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0);
  long temp;
  _result = 31 * _result + getValueInt();
  _result = 31 * _result + (getValueInteger() != null ? getValueInteger().hashCode() : 0);
  _result = 31 * _result + getValueShort();
  _result = 31 * _result + (getValueShortWrapper() != null ? getValueShortWrapper().hashCode() : 0);
  _result = 31 * _result + getValueChar();
  _result = 31 * _result + (getValueCharacter() != null ? getValueCharacter().hashCode() : 0);
  _result = 31 * _result + getValuebByte();
  _result = 31 * _result + (getValueByteWrapper() != null ? getValueByteWrapper().hashCode() : 0);
  _result = 31 * _result + (int) (getValueLong() ^ (getValueLong() >>> 32));
  _result = 31 * _result + (getValueLongWrapper() != null ? getValueLongWrapper().hashCode() : 0);
  temp = Double.doubleToLongBits(getValueDouble());
  _result = 31 * _result + (int) (temp ^ (temp >>> 32));
  _result = 31 * _result + (getValueDoubleWrapper() != null ? getValueDoubleWrapper().hashCode() : 0);
  _result = 31 * _result + (getValueFloat() != +0.0f ? Float.floatToIntBits(getValueFloat()) : 0);
  _result = 31 * _result + (getValueFloatWrapper() != null ? getValueFloatWrapper().hashCode() : 0);
  _result = 31 * _result + (isValueBoolean() ? 1 : 0);
  _result = 31 * _result + (getValueBooleanWrapper() != null ? getValueBooleanWrapper().hashCode() : 0);
  _result = 31 * _result + Arrays.hashCode(getValueIntArray());
  _result = 31 * _result + Arrays.hashCode(getValueObjectArray());
  _result = 31 * _result + (getValueString() != null ? getValueString().hashCode() : 0);
  _result = 31 * _result + (getValueObject() != null ? getValueObject().hashCode() : 0);
  _result = 31 * _result + (getValueList() != null ? getValueList().hashCode() : 0);
  return _result;
}
 
源代码26 项目: apollo-android   文件: TestQuery.java
@Override
public AsHuman1 map(ResponseReader reader) {
  final String __typename = reader.readString($responseFields[0]);
  final String name = reader.readString($responseFields[1]);
  final Double height = reader.readDouble($responseFields[2]);
  return new AsHuman1(__typename, name, height);
}
 
源代码27 项目: apollo-android   文件: HumanDetails.java
@Override
public HumanDetails map(ResponseReader reader) {
  final String __typename = reader.readString($responseFields[0]);
  final String name = reader.readString($responseFields[1]);
  final Double height = reader.readDouble($responseFields[2]);
  return new HumanDetails(__typename, name, height);
}
 
源代码28 项目: apollo-android   文件: ColorInput.java
/**
 * Green color
 */
public Builder greenInput(@NotNull Input<Double> green) {
  this.green = Utils.checkNotNull(green, "green == null");
  return this;
}
 
源代码29 项目: mavlink   文件: WheelDistance.java
private WheelDistance(BigInteger timeUsec, int count, List<Double> distance) {
    this.timeUsec = timeUsec;
    this.count = count;
    this.distance = distance;
}
 
源代码30 项目: apollo-android   文件: HeroDetailQuery.java
/**
 * Height in the preferred unit, default is meters
 */
public Optional<Double> height() {
  return this.height;
}
 
 类所在包
 同包方法