Class Bucket<V>

java.lang.Object
org.infinispan.multimap.impl.Bucket<V>

@ProtoTypeId(5300) public class Bucket<V> extends Object
Bucket used to store MultiMap values, required as HashSet cannot be directly marshalled via ProtoStream.
Since:
10.0
Author:
Ryan Emerson
  • Constructor Details

    • Bucket

      public Bucket()
    • Bucket

      public Bucket(V value)
  • Method Details

    • contains

      public boolean contains(V value)
    • add

      public Bucket<V> add(V value, boolean supportsDuplicates)
      Returns:
      null if the element exists and in this Bucket, otherwise, it returns a new Bucket instance.
    • remove

      public Bucket<V> remove(V value, boolean supportsDuplicates)
    • removeIf

      public Bucket<V> removeIf(Predicate<? super V> p)
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • toSet

      public Set<V> toSet()
      Returns:
      a defensive copy of the values collection.
    • toList

      public List<V> toList()
      Returns:
      a defensive copy of the values collection if the cache supports duplicates.
    • toString

      public String toString()
      Overrides:
      toString in class Object