in sdmx30-infomodel/src/main/java/com/epam/jsdmx/infomodel/sdmx30/WildcardReferenceMatcher.java [30:61]
public WildcardReferenceMatcher(VersionReference versionRef, boolean isStableMatch) {
validateVersionReferenceSpecific(versionRef);
this.isStable = isStableMatch;
final Version base = versionRef.getBase();
this.majorFrom = base.getMajor();
this.minorFrom = base.getMinor();
this.patchFrom = base.getPatch()
.orElseThrow(IllegalStateException::new);
final WildcardScope scope = versionRef.getScope();
switch (scope) {
case MAJOR:
this.majorTo = Short.MAX_VALUE;
this.minorTo = Short.MAX_VALUE;
this.patchTo = Short.MAX_VALUE;
break;
case MINOR:
this.majorTo = majorFrom;
this.minorTo = Short.MAX_VALUE;
this.patchTo = Short.MAX_VALUE;
break;
case PATCH:
this.majorTo = majorFrom;
this.minorTo = minorFrom;
this.patchTo = Short.MAX_VALUE;
break;
default:
throw new IllegalArgumentException("Missing support for wildcard scope: " + scope);
}
}