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

@param part
@param predicate
Removes all characteristics of the given part that do not match the given predicate . If a characteristic is removed it ' s values are also removed . @param part @param predicate
public void filterCharacteristics(PartEntries part, CharacteristicOfSinglePartPredicate predicate) {
		Map<CharacteristicIndex, CharacteristicEntries> characteristicsOfPart = characteristicEntries.get(part.getIndex());
		if (characteristicsOfPart != null) {
			Iterator<Entry<CharacteristicIndex, CharacteristicEntries>> iterator = characteristicsOfPart.entrySet().iterator();
			while (iterator.hasNext()) {
				Entry<CharacteristicIndex, CharacteristicEntries> entry = iterator.next();
				CharacteristicIndex characteristicIndex = entry.getKey();
				CharacteristicEntries characteristic = entry.getValue();
				if (!predicate.test(characteristic)) {
					iterator.remove();
					hierarchy.removeHierarchyForCharacteristic(characteristicIndex);
					removeValueEntries(characteristicIndex);
				}
			}
		}
	}
public void filterCharacteristics ( PartEntries part , CharacteristicOfSinglePartPredicate predicate ) { Map < CharacteristicIndex , CharacteristicEntries > characteristicsOfPart = characteristicEntries . get ( part . getIndex ( ) ) ; if ( characteristicsOfPart != null ) { Iterator < Entry < CharacteristicIndex , CharacteristicEntries > > iterator = characteristicsOfPart . entrySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { Entry < CharacteristicIndex , CharacteristicEntries > entry = iterator . next ( ) ; CharacteristicIndex characteristicIndex = entry . getKey ( ) ; CharacteristicEntries characteristic = entry . getValue ( ) ; if ( ! predicate . test ( characteristic ) ) { iterator . remove ( ) ; hierarchy . removeHierarchyForCharacteristic ( characteristicIndex ) ; removeValueEntries ( characteristicIndex ) ; } } } }
Removes all characteristics of the given part that do not match the given predicate.
Removes all characteristics of the given part that do not match the given predicate .
// remove values for that characteristic