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.

@FunctionalInterface public interface FilterAttributeModifier<V>
A functional interface for modifying filter attribute values. It can be used to define custom rules for how attribute values should be modified.
  • Method Details

    • collectionAdd

      static <E, V extends Collection<E>> FilterAttributeModifier<V> collectionAdd(Supplier<V> collectionFactory)
      Creates a FilterAttributeModifier for 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 collection
      V - the type of the collection
      Parameters:
      collectionFactory - a supplier that provides a new instance of the collection
      Returns:
      a FilterAttributeModifier that adds elements from the new collection to the current collection
    • collectionRemove

      static <E, V extends Collection<E>> FilterAttributeModifier<V> collectionRemove(Supplier<V> collectionFactory)
      Creates a FilterAttributeModifier for 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 collection
      V - the type of the collection
      Parameters:
      collectionFactory - a supplier that provides a new instance of the collection
      Returns:
      a FilterAttributeModifier that removes elements from the current collection based on the new collection
    • modify

      V modify(V current, V value)
      Modifies the given current attribute value with the specified new value based on custom rules.
      Parameters:
      current - the current value of the attribute
      value - the new value to be applied to the attribute
      Returns:
      the modified attribute value