static int hashCode(final DecimalTypeDefinition type) { return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(), type.getUnits().orElse(null), type.getDefaultValue().orElse(null), type.getFractionDigits(), type.getRangeConstraint().orElse(null)); }
@Override public boolean equals(final Object obj) { return DecimalTypeDefinition.equals(this, obj); } }
static boolean equals(final DecimalTypeDefinition type, final Object obj) { if (type == obj) { return true; } final DecimalTypeDefinition other = TypeDefinitions.castIfEquals(DecimalTypeDefinition.class, type, obj); return other != null && type.getFractionDigits() == other.getFractionDigits() && type.getRangeConstraint().equals(other.getRangeConstraint()); }
final DecimalTypeBuilder tmpBuilder = BaseTypes.decimalTypeBuilder(decimal.getPath()); tmpBuilder.setFractionDigits(decimal.getFractionDigits()); final DecimalTypeDefinition tmp = tmpBuilder.build(); if (!tmp.getRangeConstraint().equals(decimal.getRangeConstraint())) { return new Restrictions() { @Override final DecimalTypeDefinition base = decimal.getBaseType(); if (base != null && base.getBaseType() != null) { range = currentOrEmpty(decimal.getRangeConstraint(), base.getRangeConstraint()); } else { range = decimal.getRangeConstraint();
@Override public int getFractionDigits() { return baseType().getFractionDigits(); }
private static TypeDefinition<?> baseTypeIfNotConstrained(final @NonNull DecimalTypeDefinition type) { return baseTypeIfNotConstrained(type, type.getBaseType()); }
@Override public Optional<RangeConstraint<BigDecimal>> getRangeConstraint() { return decimal.getRangeConstraint(); }
if (type instanceof DecimalTypeDefinition) { final DecimalTypeDefinition decimal = (DecimalTypeDefinition) type; final DecimalTypeBuilder tmpBuilder = BaseTypes.decimalTypeBuilder(decimal.getPath()); tmpBuilder.setFractionDigits(decimal.getFractionDigits()); final DecimalTypeDefinition tmp = tmpBuilder.build(); if (!tmp.getRangeConstraint().equals(decimal.getRangeConstraint())) { return new Restrictions() { @Override final DecimalTypeDefinition base = decimal.getBaseType(); if (base != null && base.getBaseType() != null) { range = currentOrEmpty(decimal.getRangeConstraint(), base.getRangeConstraint()); } else { range = decimal.getRangeConstraint();
static String toString(final DecimalTypeDefinition type) { return TypeDefinitions.toStringHelper(type).add("fractionDigits", type.getFractionDigits()).toString(); } }
static boolean equals(final DecimalTypeDefinition type, final Object obj) { if (type == obj) { return true; } final DecimalTypeDefinition other = TypeDefinitions.castIfEquals(DecimalTypeDefinition.class, type, obj); return other != null && type.getFractionDigits() == other.getFractionDigits() && type.getRangeConstraint().equals(other.getRangeConstraint()); }
private static TypeDefinition<?> baseTypeIfNotConstrained(final @NonNull DecimalTypeDefinition type) { return baseTypeIfNotConstrained(type, type.getBaseType()); }
@Override public Optional<? extends RangeConstraint<?>> getRangeConstraint() { return decimal.getRangeConstraint(); }
static int hashCode(final DecimalTypeDefinition type) { return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(), type.getUnits().orElse(null), type.getDefaultValue().orElse(null), type.getFractionDigits(), type.getRangeConstraint().orElse(null)); }
@Override public int getFractionDigits() { return getBaseType().getFractionDigits(); }
@Override public boolean equals(final Object obj) { return DecimalTypeDefinition.equals(this, obj); }
static String toString(final DecimalTypeDefinition type) { return TypeDefinitions.toStringHelper(type).add("fractionDigits", type.getFractionDigits()).toString(); } }
@Override public boolean equals(final Object obj) { return DecimalTypeDefinition.equals(this, obj); } }
@Override public int getFractionDigits() { return getBaseType().getFractionDigits(); }
@Override public boolean equals(final Object obj) { return DecimalTypeDefinition.equals(this, obj); }
@Override public int getFractionDigits() { return baseType().getFractionDigits(); }