src/main/java/cz/diribet/aqdef/model/AqdefObjectModel.java
/**
	 * Removes all parts that do not match the given predicate.
	 * If a part is removed it's characteristics and values are also removed.
	 *
	 * @param predicate
	 */
Removes all parts that do not match the given predicate.
If a part is removed it's characteristics and values are also removed.

@param predicate
Removes all parts that do not match the given predicate . If a part is removed it ' s characteristics and values are also removed . @param predicate
public void filterParts(PartPredicate predicate) {
		Iterator<Map.Entry<PartIndex, PartEntries>> iterator = partEntries.entrySet().iterator();
		while (iterator.hasNext()) {
			Entry<PartIndex, PartEntries> entry = iterator.next();
			PartIndex partIndex = entry.getKey();
			PartEntries part = entry.getValue();
			if (!predicate.test(part)) {
				iterator.remove();
				hierarchy.removeHierarchyForPart(partIndex);
				characteristicEntries.remove(partIndex);
				valueEntries.remove(partIndex);
			}
		}
	}
public void filterParts ( PartPredicate predicate ) { Iterator < Map . Entry < PartIndex , PartEntries > > iterator = partEntries . entrySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { Entry < PartIndex , PartEntries > entry = iterator . next ( ) ; PartIndex partIndex = entry . getKey ( ) ; PartEntries part = entry . getValue ( ) ; if ( ! predicate . test ( part ) ) { iterator . remove ( ) ; hierarchy . removeHierarchyForPart ( partIndex ) ; characteristicEntries . remove ( partIndex ) ; valueEntries . remove ( partIndex ) ; } } }
Removes all parts that do not match the given predicate.
Removes all parts that do not match the given predicate .
// remove characteristics and values for that part