java.lang.Double Java Examples
The following examples show how to use
java.lang.Double.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AllTypesModelViewModel_.java From epoxy with Apache License 2.0 | 6 votes |
@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; }
Example #2
Source File: ColorInput.java From apollo-android with MIT License | 6 votes |
@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; }
Example #3
Source File: ColorInput.java From apollo-android with MIT License | 6 votes |
@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; }
Example #4
Source File: BgReadingMessage.java From xDrip with GNU General Public License v3.0 | 6 votes |
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; }
Example #5
Source File: TestQuery.java From apollo-android with MIT License | 5 votes |
@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); }
Example #6
Source File: TestQuery.java From apollo-android with MIT License | 5 votes |
@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); }
Example #7
Source File: TestQuery.java From apollo-android with MIT License | 5 votes |
@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); }
Example #8
Source File: LRModel.java From ml-models with Apache License 2.0 | 5 votes |
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); } }
Example #9
Source File: LRModel.java From ml-models with Apache License 2.0 | 5 votes |
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); } }
Example #10
Source File: LRModel.java From ml-models with Apache License 2.0 | 5 votes |
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); } }
Example #11
Source File: LRModel.java From ml-models with Apache License 2.0 | 5 votes |
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); } }
Example #12
Source File: BoxedTypesMethodsFactoryMethodStorIOContentResolverGetResolver.java From storio with Apache License 2.0 | 5 votes |
/** * {@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; }
Example #13
Source File: BoxedTypesPrivateFieldsIgnoreNullStorIOContentResolverGetResolver.java From storio with Apache License 2.0 | 5 votes |
/** * {@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; }
Example #14
Source File: BoxedTypesMethodsFactoryMethodIgnoreNullStorIOSQLiteGetResolver.java From storio with Apache License 2.0 | 5 votes |
/** * {@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; }
Example #15
Source File: ConflictingFieldNames.java From dataenum with Apache License 2.0 | 5 votes |
@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(); }
Example #16
Source File: EfficientEquals.java From dataenum with Apache License 2.0 | 5 votes |
@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(); }
Example #17
Source File: PrimitiveValue.java From dataenum with Apache License 2.0 | 5 votes |
@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(); }
Example #18
Source File: ColorInput.java From apollo-android with MIT License | 5 votes |
@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; }
Example #19
Source File: BoxedTypesPrivateFieldsIgnoreNullStorIOSQLiteGetResolver.java From storio with Apache License 2.0 | 5 votes |
/** * {@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; }
Example #20
Source File: BloodTestMessage.java From xDrip with GNU General Public License v3.0 | 5 votes |
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; }
Example #21
Source File: ColorInput.java From apollo-android with MIT License | 5 votes |
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; }
Example #22
Source File: HumanDetails.java From apollo-android with MIT License | 5 votes |
@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); }
Example #23
Source File: ColorInput.java From apollo-android with MIT License | 5 votes |
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; }
Example #24
Source File: ModelWithAllFieldTypes_.java From epoxy with Apache License 2.0 | 5 votes |
@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; }
Example #25
Source File: MaxFloatingPointTest.java From j2objc with Apache License 2.0 | 5 votes |
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)); }
Example #26
Source File: ModelWithAllPrivateFieldTypes_.java From epoxy with Apache License 2.0 | 5 votes |
@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; }
Example #27
Source File: HumanDetails.java From apollo-android with MIT License | 5 votes |
@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); }
Example #28
Source File: TestQuery.java From apollo-android with MIT License | 4 votes |
/** * Height in the preferred unit, default is meters */ public Optional<Double> height() { return this.height; }
Example #29
Source File: TestQuery.java From apollo-android with MIT License | 4 votes |
/** * Height in the preferred unit, default is meters */ public Optional<Double> height() { return this.height; }
Example #30
Source File: JformOrderMain2Entity.java From jeecg with Apache License 2.0 | 4 votes |
/** *方法: 取得java.lang.Double *@return: java.lang.Double 订单金额 */ @Column(name ="ORDER_MONEY",nullable=true,scale=3,length=10) public java.lang.Double getOrderMoney(){ return this.orderMoney; }