@Override public ScalarMongoTimestamp fromJsonValue(JsonNumber value) { BigInteger bigValue = value.bigIntegerValue(); return new DefaultScalarMongoTimestamp(bigValue.shiftRight(32).intValue(), bigValue.shiftLeft(32).shiftRight(32).intValue()); }
return (T) number.bigIntegerValue();
return (T) number.bigIntegerValue();
/** * Create a new UInt64 based on the given JSON object. Any missing values * will be set to their defaults. * * @param jsonObject * The JSON object to parse. * @return A UInt64 message based on the given JSON object. */ public static UInt64 fromJsonObject(JsonObject jsonObject) { // check the fields long data = jsonObject.containsKey(UInt64.FIELD_DATA) ? Primitive .toUInt64(jsonObject.getJsonNumber(UInt64.FIELD_DATA) .bigIntegerValue()) : 0L; return new UInt64(data); } }
/** * Create a new UInt64 based on the given JSON object. Any missing values * will be set to their defaults. * * @param jsonObject * The JSON object to parse. * @return A UInt64 message based on the given JSON object. */ public static UInt64 fromJsonObject(JsonObject jsonObject) { // check the fields long data = jsonObject.containsKey(UInt64.FIELD_DATA) ? Primitive .toUInt64(jsonObject.getJsonNumber(UInt64.FIELD_DATA) .bigIntegerValue()) : 0L; return new UInt64(data); } }
return number.bigIntegerValue();
return number.bigIntegerValue();
break; case "java.math.BigInteger": args[0] = numberProperty.bigIntegerValue(); break; break; case "java.math.BigInteger": values.add(numberArrayValue.bigIntegerValue()); break; break; case "java.math.BigInteger": map.put(key, valueNumber.bigIntegerValue()); break;
for (int i = 0; i < data.length; i++) { data[i] = Primitive.toUInt64(jsonData.getJsonNumber(i) .bigIntegerValue());
for (int i = 0; i < data.length; i++) { data[i] = Primitive.toUInt64(jsonData.getJsonNumber(i) .bigIntegerValue());
return converter.to(JsonNumber.class.cast(jsonValue).doubleValue()); } else if (BigInteger.class == key.getTo()) { return converter.to(JsonNumber.class.cast(jsonValue).bigIntegerValue()); } else if (BigDecimal.class == key.getTo()) { return converter.to(JsonNumber.class.cast(jsonValue).bigDecimalValue());
return converter.to(JsonNumber.class.cast(jsonValue).doubleValue()); } else if (BigInteger.class == key.getTo()) { return converter.to(JsonNumber.class.cast(jsonValue).bigIntegerValue()); } else if (BigDecimal.class == key.getTo()) { return converter.to(JsonNumber.class.cast(jsonValue).bigDecimalValue());