Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Optional<Map.Entry<O, Option>> matchOption = optionMap.entrySet().stream()
- .filter(option ->
- recognition.stream()
- .map(PlayCollectSpeech.Speech.Entry::getText)
- .map(String::toLowerCase)
- .anyMatch(entryText ->
- entryText.contains(option.getValue().getId())
- || option.getValue().getLocalizedVariants(locale).stream().anyMatch(entryText::contains)
- )
- )
- .findFirst();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement