diff options
author | 2023-09-03 17:57:38 +0200 | |
---|---|---|
committer | 2023-09-03 17:57:38 +0200 | |
commit | cd96a9a4f54d45cda3ddf5df474946445d557090 (patch) | |
tree | 7a96a177236888ede9a51ffdd51940a672cfd070 /subprojects/store/src/main | |
parent | build: runtimeOnly Eclipse Collections if posible (diff) | |
download | refinery-cd96a9a4f54d45cda3ddf5df474946445d557090.tar.gz refinery-cd96a9a4f54d45cda3ddf5df474946445d557090.tar.zst refinery-cd96a9a4f54d45cda3ddf5df474946445d557090.zip |
feat: scope propagator in language
Diffstat (limited to 'subprojects/store/src/main')
-rw-r--r-- | subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java index 2e7780da..bfaeea25 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java +++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java | |||
@@ -83,7 +83,10 @@ public record NonEmptyCardinalityInterval(int lowerBound, UpperCardinality upper | |||
83 | 83 | ||
84 | @Override | 84 | @Override |
85 | public String toString() { | 85 | public String toString() { |
86 | var closeBracket = upperBound instanceof UnboundedUpperCardinality ? ")" : "]"; | 86 | if (upperBound instanceof FiniteUpperCardinality finiteUpperCardinality && |
87 | return "[%d..%s%s".formatted(lowerBound, upperBound, closeBracket); | 87 | finiteUpperCardinality.finiteUpperBound() == lowerBound) { |
88 | return "[%d]".formatted(lowerBound); | ||
89 | } | ||
90 | return "[%d..%s]".formatted(lowerBound, upperBound); | ||
88 | } | 91 | } |
89 | } | 92 | } |