Interface BaseSetBucket<E>

Type Parameters:
E - Type of elements in the set.
All Known Implementing Classes:
SetBucket, SortedSetBucket

public interface BaseSetBucket<E>
Implements base functionalities shared by set-like data structures.

Some functionalities in set are shared across sets. In such a way that it requires a common interface when operating with the FunctionalMap API. This allows for functions to operate in any concrete implementations of sets.

  • Method Details

    • union

      default Collection<ScoredValue<E>> union(Collection<ScoredValue<E>> input, double weight, SortedSetBucket.AggregateFunction function)
      Calculates the union of two sets.

      The method calculates the union of this BaseSetBucket instance with the provided input collection. In case of duplicates, the elements in the input take precedence.

      Parameters:
      input - Items from another set to create the union.
      weight - Weight to apply to scores of each element.
      function - Aggregate function to apply to scores.
      Returns:
      Collection with the elements of the union of the two sets.
    • inter

      default Collection<ScoredValue<E>> inter(Collection<ScoredValue<E>> input, double weight, SortedSetBucket.AggregateFunction function)
      Calculates the intersection of two sets.

      Calculates the intersection of this BaseSetBucket instance with the provided input collection.

      Parameters:
      input - Items from another set to create the intersection.
      weight - Weight to apply to scores of each element.
      function - Aggregate function to apply to scores.
      Returns:
      Collection with the elements in the intersection of the two sets.
    • getAsSet

      Set<ScoredValue<E>> getAsSet()
    • getAsList

      List<ScoredValue<E>> getAsList()
    • getScore

      Double getScore(org.infinispan.multimap.impl.internal.MultimapObjectWrapper<E> key)