com.kintone.client.model.record.NumberFieldValue Maven / Gradle / Ivy
// Generated by delombok at Fri Jan 21 13:34:53 JST 2022
package com.kintone.client.model.record;
import java.math.BigDecimal;
/**
* A value object for a Number field.
*/
public final class NumberFieldValue implements FieldValue {
/**
* The value of the Number field.
*/
private final BigDecimal value;
public NumberFieldValue(BigDecimal value) {
this.value = value;
}
public NumberFieldValue(long value) {
this.value = BigDecimal.valueOf(value);
}
/**
* {@inheritDoc}
*/
@Override
public FieldType getType() {
return FieldType.NUMBER;
}
/**
* The value of the Number field.
*/
@java.lang.SuppressWarnings("all")
public BigDecimal getValue() {
return this.value;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof NumberFieldValue)) return false;
final NumberFieldValue other = (NumberFieldValue) o;
final java.lang.Object this$value = this.getValue();
final java.lang.Object other$value = other.getValue();
if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $value = this.getValue();
result = result * PRIME + ($value == null ? 43 : $value.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "NumberFieldValue(value=" + this.getValue() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy