src/main/java/cz/diribet/aqdef/model/AqdefObjectModel.java
/**
	 * Removes all groups that do not match the given predicate.
	 *
	 * @param predicate
	 */
Removes all groups that do not match the given predicate.
@param predicate
Removes all groups that do not match the given predicate . @param predicate
public void filterGroups(GroupPredicate predicate) {
		partEntries.forEach((partIndex, part) -> {
			Map<GroupIndex, GroupEntries> groupsOfPart = groupEntries.get(part.getIndex());
			if (groupsOfPart != null) {
				Iterator<Entry<GroupIndex, GroupEntries>> iterator = groupsOfPart.entrySet().iterator();
				while (iterator.hasNext()) {
					Entry<GroupIndex, GroupEntries> entry = iterator.next();
					GroupIndex groupIndex = entry.getKey();
					GroupEntries group = entry.getValue();
					if (!predicate.test(part, group)) {
						iterator.remove();
						hierarchy.removeHierarchyForGroup(groupIndex);
					}
				}
			}
		});
	}
public void filterGroups ( GroupPredicate predicate ) { partEntries . forEach ( ( partIndex , part ) -> { Map < GroupIndex , GroupEntries > groupsOfPart = groupEntries . get ( part . getIndex ( ) ) ; if ( groupsOfPart != null ) { Iterator < Entry < GroupIndex , GroupEntries > > iterator = groupsOfPart . entrySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { Entry < GroupIndex , GroupEntries > entry = iterator . next ( ) ; GroupIndex groupIndex = entry . getKey ( ) ; GroupEntries group = entry . getValue ( ) ; if ( ! predicate . test ( part , group ) ) { iterator . remove ( ) ; hierarchy . removeHierarchyForGroup ( groupIndex ) ; } } } } ) ; }
Removes all groups that do not match the given predicate.
Removes all groups that do not match the given predicate .