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

@param predicate
Removes all characteristics that do not match the given predicate . If a characteristic is removed it ' s values are also removed . @param predicate
public void filterCharacteristics(CharacteristicPredicate predicate) {
		partEntries.forEach((partIndex, part) -> {
			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(part, characteristic)) {
						iterator.remove();
						hierarchy.removeHierarchyForCharacteristic(characteristicIndex);
						removeValueEntries(characteristicIndex);
					}
				}
			}
		});
	}
public void filterCharacteristics ( CharacteristicPredicate predicate ) { partEntries . forEach ( ( partIndex , part ) -> { 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 ( part , characteristic ) ) { iterator . remove ( ) ; hierarchy . removeHierarchyForCharacteristic ( characteristicIndex ) ; removeValueEntries ( characteristicIndex ) ; } } } } ) ; }
Removes all characteristics that do not match the given predicate.
Removes all characteristics that do not match the given predicate .
// remove values for that characteristic