LinearGraphAnswer (@NotNull CollapsedController graphController, @NotNull LinearGraphAction action) { ActionContext context = new ActionContext(graphController.getCollapsedGraph(), graphController.getPermanentGraphInfo(), action); for (ActionCase actionCase : FILTER_ACTION_CASES) { if (actionCase.supportedActionTypes().contains(context.getActionType())) { LinearGraphAnswer graphAnswer = actionCase.performAction(context); if (graphAnswer != null) return graphAnswer; } } return null; }