static int hashCode(final BinaryTypeDefinition type) {
return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(), type.getUnits(),
- type.getDefaultValue(), type.getLengthConstraints());
+ type.getDefaultValue(), type.getLengthConstraint());
}
static int hashCode(final BitsTypeDefinition type) {
static int hashCode(final StringTypeDefinition type) {
return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(), type.getUnits(),
- type.getDefaultValue(), type.getLengthConstraints(), type.getPatternConstraints());
+ type.getDefaultValue(), type.getLengthConstraint(), type.getPatternConstraints());
}
static int hashCode(final UnionTypeDefinition type) {
}
final BinaryTypeDefinition other = castIfEquals(BinaryTypeDefinition.class, type, obj);
- return other != null && type.getLengthConstraints().equals(other.getLengthConstraints());
+ return other != null && type.getLengthConstraint().equals(other.getLengthConstraint());
}
static boolean equals(final BitsTypeDefinition type, final Object obj) {
}
final StringTypeDefinition other = castIfEquals(StringTypeDefinition.class, type, obj);
- return other != null && type.getLengthConstraints().equals(other.getLengthConstraints())
+ return other != null && type.getLengthConstraint().equals(other.getLengthConstraint())
&& type.getPatternConstraints().equals(other.getPatternConstraints());
}
}
static String toString(final BinaryTypeDefinition type) {
- return toStringHelper(type).add("length", type.getLengthConstraints()).toString();
+ return toStringHelper(type).add("length", type.getLengthConstraint().orElse(null)).toString();
}
static String toString(final BitsTypeDefinition type) {
}
static String toString(final StringTypeDefinition type) {
- return toStringHelper(type).add("length", type.getLengthConstraints())
+ return toStringHelper(type).add("length", type.getLengthConstraint().orElse(null))
.add("patterns", type.getPatternConstraints()).toString();
}