Skip to content

Commit

Permalink
Merge pull request #47 from ix0rai/range-api
Browse files Browse the repository at this point in the history
add public methods for getting min and max on ranges
  • Loading branch information
ix0rai authored Apr 19, 2024
2 parents 1321cc1 + 8143d44 commit 846000f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/quiltmc/config/api/Constraint.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public Range(T min, T max, Comparator<T> comparator) {
this.comparator = comparator;
}

public T min() {
return this.min;
}

public T max() {
return this.max;
}

@Override
public Optional<String> test(T value) {
int minTest = this.comparator.compare(this.min, value);
Expand Down

0 comments on commit 846000f

Please sign in to comment.