Package org.patternfly.filter
Interface FilterAttributeModifier<V>
- Type Parameters:
V- the type of the attribute value
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for modifying filter attribute values. It can be used to define custom rules for how attribute values
should be modified.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E,V extends Collection<E>>
FilterAttributeModifier<V> collectionAdd(Supplier<V> collectionFactory) Creates aFilterAttributeModifierfor adding values to a collection.static <E,V extends Collection<E>>
FilterAttributeModifier<V> collectionRemove(Supplier<V> collectionFactory) Creates aFilterAttributeModifierfor removing values from a collection.Modifies the given current attribute value with the specified new value based on custom rules.
-
Method Details
-
collectionAdd
static <E,V extends Collection<E>> FilterAttributeModifier<V> collectionAdd(Supplier<V> collectionFactory) Creates aFilterAttributeModifierfor adding values to a collection. This modifier combines the current collection value with a new collection value, appending elements from both collections.- Type Parameters:
E- the type of elements in the collectionV- the type of the collection- Parameters:
collectionFactory- a supplier that provides a new instance of the collection- Returns:
- a
FilterAttributeModifierthat adds elements from the new collection to the current collection
-
collectionRemove
static <E,V extends Collection<E>> FilterAttributeModifier<V> collectionRemove(Supplier<V> collectionFactory) Creates aFilterAttributeModifierfor removing values from a collection. This modifier combines the current collection value with a new collection value, removing elements found in the new collection from the current collection.- Type Parameters:
E- the type of elements in the collectionV- the type of the collection- Parameters:
collectionFactory- a supplier that provides a new instance of the collection- Returns:
- a
FilterAttributeModifierthat removes elements from the current collection based on the new collection
-
modify
Modifies the given current attribute value with the specified new value based on custom rules.- Parameters:
current- the current value of the attributevalue- the new value to be applied to the attribute- Returns:
- the modified attribute value
-