@Override public boolean equals(Object obj) { if (this == obj){ return true; } if (!(obj instanceof JsonNumber)) { return false; } JsonNumber other = (JsonNumber)obj; return bigDecimalValue().equals(other.bigDecimalValue()); }
@Override public BigDecimal getBigDecimal() { if (state == Event.VALUE_NUMBER) { return ((JsonNumber)current.getJsonValue()).bigDecimalValue(); } throw new IllegalStateException(JsonMessages.PARSER_GETBIGDECIMAL_ERR(state)); }
@Override public boolean equals(Object obj) { if (this == obj){ return true; } if (!(obj instanceof JsonNumber)) { return false; } JsonNumber other = (JsonNumber)obj; return bigDecimalValue().equals(other.bigDecimalValue()); }
@Override public BigDecimal getBigDecimal() { if (state == Event.VALUE_NUMBER) { return ((JsonNumber)current.getJsonValue()).bigDecimalValue(); } throw new IllegalStateException(JsonMessages.PARSER_GETBIGDECIMAL_ERR(state)); }
@Override public BigDecimal getBigDecimal() { if (currentEvent != Event.VALUE_NUMBER) { throw new IllegalStateException("getBigDecimal is for numbers"); } return JsonNumber.class.cast(currentValue).bigDecimalValue(); }
@Override public BigDecimal getBigDecimal() { if (currentEvent != Event.VALUE_NUMBER) { throw new IllegalStateException("getBigDecimal is for numbers"); } return JsonNumber.class.cast(currentValue).bigDecimalValue(); }
@Override public boolean equals(final Object obj) { return JsonNumber.class.isInstance(obj) && JsonNumber.class.cast(obj).bigDecimalValue().equals(value); } }
@Override public BigDecimal getBigDecimal() { if (currentEvent != Event.VALUE_NUMBER) { throw new IllegalStateException("getBigDecimal is for numbers"); } return JsonNumber.class.cast(currentValue).bigDecimalValue(); }
@Override public boolean equals(final Object obj) { return JsonNumber.class.isInstance(obj) && JsonNumber.class.cast(obj).bigDecimalValue().equals(value); } }
@Override public BigDecimal getBigDecimal() { if (currentEvent != Event.VALUE_NUMBER) { throw new IllegalStateException("getBigDecimal is for numbers"); } return JsonNumber.class.cast(currentValue).bigDecimalValue(); }
@Override public BigDecimal getBigDecimal() { if (currentEvent != Event.VALUE_NUMBER) { throw new IllegalStateException("getBigDecimal is for numbers"); } return JsonNumber.class.cast(currentValue).bigDecimalValue(); }
@Override public boolean equals(final Object obj) { return JsonNumber.class.isInstance(obj) && JsonNumber.class.cast(obj).bigDecimalValue().equals(value); } }
@Override public boolean equals(final Object obj) { if (JsonDoubleImpl.class.isInstance(obj)) { return JsonDoubleImpl.class.cast(obj).value == value; } return JsonNumber.class.isInstance(obj) && Objects.equals(JsonNumber.class.cast(obj).bigDecimalValue(), bigDecimalValue()); }
@Override public boolean equals(Object obj) { if (this == obj){ return true; } if (!(obj instanceof JsonNumber)) { return false; } JsonNumber other = (JsonNumber)obj; return bigDecimalValue().equals(other.bigDecimalValue()); }
@Override public boolean equals(Object obj) { if (!(obj instanceof JsonNumber)) { return false; } JsonNumber other = (JsonNumber)obj; return bigDecimalValue().equals(other.bigDecimalValue()); }
@Override public boolean equals(final Object obj) { if (JsonDoubleImpl.class.isInstance(obj)) { return JsonDoubleImpl.class.cast(obj).value == value; } return JsonNumber.class.isInstance(obj) && Objects.equals(JsonNumber.class.cast(obj).bigDecimalValue(), bigDecimalValue()); }
@Override public boolean equals(final Object obj) { if (JsonLongImpl.class.isInstance(obj)) { return JsonLongImpl.class.cast(obj).value == value; } return JsonNumber.class.isInstance(obj) && JsonNumber.class.cast(obj).bigDecimalValue().equals(bigDecimalValue()); } }
public Candlestick(JsonArray jsonArray) { super( Instant.ofEpochMilli(jsonArray.getJsonNumber(0).longValue()), jsonArray.getJsonNumber(1).bigDecimalValue(), jsonArray.getJsonNumber(2).bigDecimalValue(), jsonArray.getJsonNumber(3).bigDecimalValue(), jsonArray.getJsonNumber(4).bigDecimalValue(), jsonArray.getJsonNumber(5).bigDecimalValue() ); }
@Override public BigDecimal getBigDecimal() { if (state == Event.VALUE_NUMBER) { return ((JsonNumber)current.getJsonValue()).bigDecimalValue(); } throw new IllegalStateException(JsonMessages.PARSER_GETBIGDECIMAL_ERR(state)); }
@Override public BigDecimal getBigDecimal() { if (state == Event.VALUE_NUMBER) { return ((JsonNumber)current.getJsonValue()).bigDecimalValue(); } throw new IllegalStateException(JsonMessages.PARSER_GETBIGDECIMAL_ERR(state)); }