XBreakpointTypeGroup (@NotNull B b, @NotNull Collection<? extends XBreakpointTypeGroup> groups) { if (b instanceof XBreakpoint breakpoint) { for (XBreakpointTypeGroup group : groups) { if (group.getBreakpointType() == breakpoint.getType()) { return group; } } return new XBreakpointTypeGroup(breakpoint.getType()); } return null; }