boolean (@NotNull List<? super String> path, ActionUrl actionUrl) { ArrayList<String> groupPath = actionUrl.getGroupPath(); if (path.size() > groupPath.size()) return false; for (int i = 0; i < path.size(); i++) { if (!Objects.equals(path.get(path.size() - 1 - i), groupPath.get(groupPath.size() - 1 - i))) { return false; } } return true; }