Skip to content

Commit

Permalink
Substitution group backwards compatibility (#933)
Browse files Browse the repository at this point in the history
* Substitution group fix

* Backwards compatibility

* Backwards compatibility

* Backwards compatibility

* Update RosettaXMLConfiguration.java
  • Loading branch information
SimonCockx authored Feb 25, 2025
1 parent 83fb916 commit 3ef35ea
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ public List<ModelSymbolId> getSubstitutionsFor(String substitutionGroup) {
.map(e -> e.getKey())
.collect(Collectors.toList());
}
@Deprecated // use getSubstitutionsFor instead.
public List<ModelSymbolId> getSubstitutionsForType(ModelSymbolId symbolId) {
return typeConfigMap.entrySet().stream()
.filter(e -> e.getValue().getSubstitutionFor().map(t -> t.equals(symbolId)).orElse(false))
.map(e -> e.getKey())
.collect(Collectors.toList());
}

@Override
public int hashCode() {
Expand Down

0 comments on commit 3ef35ea

Please sign in to comment.