src/main/java/cz/diribet/aqdef/model/AqdefObjectModel.java
/**
	 * Removes all groups of the given part that do not match the given predicate.
	 *
	 * @param part
	 * @param predicate
	 */
Removes all groups of the given part that do not match the given predicate.
@param part
@param predicate
Removes all groups of the given part that do not match the given predicate . @param part @param predicate
public void filterGroups(PartEntries part, GroupOfSinglePartPredicate predicate) {
		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(group)) {
					iterator.remove();
					hierarchy.removeHierarchyForGroup(groupIndex);
				}
			}
		}
	}
public void filterGroups ( PartEntries part , GroupOfSinglePartPredicate predicate ) { 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 ( group ) ) { iterator . remove ( ) ; hierarchy . removeHierarchyForGroup ( groupIndex ) ; } } } }
Removes all groups of the given part that do not match the given predicate.
Removes all groups of the given part that do not match the given predicate .