Open matentzn opened 4 months ago
A workaround might be using Collection<Languages> languages = checker.expressibleInLanguages();
The documentation states that the returned languages are minimal w.r.t. isSubLanguageOf. So, if the set is not a singleton, we could impose an order and return the first result. Here is a snippet:
Collection<Languages> languages = checker.expressibleInLanguages();
if (languages == null || languages.isEmpty()) {
System.err.println("No language found");
} else {
Languages[] array = languages.toArray(new Languages[languages.size()]);
Arrays.sort(array);
System.err.println(array[0]);
}
Your commit message is not correct: expressibleInLanguages()
does not return all languages. Each language in the collection
However, there may be multiple languages satisfying these criteria. In this case, sorting just makes the output deterministic.
Thank you @ckindermann - I will make sure to rectify the commit message when its time to create a squash merge.
This is try to sort out the problem that the previous solution shows gibberish expressivity levels:
"expressivity": "RRESTRCUCINTUNIVRESTREROIF(D)". But it does not work..
Resolves [#ISSUE, resolves #ISSUE]
docs/
have been added/updatedmvn verify
says all tests passmvn site
says all JavaDocs correctCHANGELOG.md
has been updated[DESCRIPTION, mentioning relevant #ISSUE]