List<String> (List<? extends BooleanOptionKey> options) { List<String> groupOrder = new ArrayList<>(); for (BooleanOptionKey each : options) { if (each.groupName != null && !groupOrder.contains(each.groupName)) { groupOrder.add(each.groupName); } } return groupOrder; }