boolean (String pattern, Predicate<? super MatchedValue> consumer) { Matcher matcher = ActionSearchUtilKt.buildMatcher(pattern); Map<@ActionText String, ApplyIntentionAction> intentionMap = myIntentions.getValue(); Stream<ActionWrapper> intentions = intentionMap.keySet().stream() .map(intentionText -> { ApplyIntentionAction intentionAction = intentionMap.get(intentionText); if (myModel.actionMatches(pattern, matcher, intentionAction) == MatchMode.NONE) { return null; } GroupMapping groupMapping = GroupMapping.createFromText(intentionText, false); return new ActionWrapper(intentionAction, groupMapping, MatchMode.INTENTION, myModel); }) .filter(Objects::nonNull); return processItems(pattern, MatchedValueType.INTENTION, intentions, consumer); }