Class 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 Detail

      • Bucket

        public Bucket()
      • Bucket

        public Bucket​(V value)
    • Method Detail

      • 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)
      • 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.