Skip to content

Commit

Permalink
Merge pull request #80 from fivetran/multipleOf
Browse files Browse the repository at this point in the history
Support NumberFormat#multipleOf
  • Loading branch information
cowtowncoder committed Sep 24, 2015
2 parents 720b331 + 0b8c831 commit caa2b7b
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ public class NumberSchema extends ValueTypeSchema
/**This attribute defines the maximum value of the instance property*/
@JsonProperty
private Double maximum = null;

/**This attribute defines the minimum value of the instance property*/
@JsonProperty
private Double minimum = null;

/** The value of the instance needs to be a multiple of this attribute */
@JsonProperty
private Double multipleOf = null;

@Override
public NumberSchema asNumberSchema() { return this; }

Expand All @@ -52,6 +56,10 @@ public Double getMaximum() {
public Double getMinimum() {
return minimum;
}

public Double getMultipleOf() {
return multipleOf;
}

/* (non-Javadoc)
* @see com.fasterxml.jackson.databind.jsonSchema.types.JsonSchema#getType()
Expand Down Expand Up @@ -81,6 +89,10 @@ public void setMinimum(Double minimum) {
this.minimum = minimum;
}

public void setMultipleOf(Double multipleOf) {
this.multipleOf = multipleOf;
}

@Override
public boolean equals(Object obj)
{
Expand All @@ -96,7 +108,7 @@ protected boolean _equals(NumberSchema that)
equals(getExclusiveMinimum(), that.getExclusiveMinimum()) &&
equals(getMaximum(), that.getMaximum()) &&
equals(getMinimum(), that.getMinimum()) &&
equals(getMultipleOf(), that.getMultipleOf()) &&
super._equals(that);
}

}
}

0 comments on commit caa2b7b

Please sign in to comment.