Class BucketSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<BucketId>, java.util.Collection<BucketId>, java.util.Set<BucketId>

    public class BucketSet
    extends java.util.HashSet<BucketId>
    A set of bucket ids covered by a document selector.
    Author:
    Simon Thoresen Hult
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BucketSet()
      Constructs a new bucket set that contains no ids.
      BucketSet​(BucketId id)
      Constructs a new bucket set that contains a single id.
      BucketSet​(BucketSet set)
      Constructs a new bucket set that is a copy of another.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BucketSet intersection​(BucketSet rhs)
      Returns the intersection between this bucket set and another.
      BucketSet union​(BucketSet rhs)
      Returns the union between this bucket set and another.
      • Methods inherited from class java.util.HashSet

        add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
    • Constructor Detail

      • BucketSet

        public BucketSet()
        Constructs a new bucket set that contains no ids.
      • BucketSet

        public BucketSet​(BucketId id)
        Constructs a new bucket set that contains a single id.
        Parameters:
        id - The id to add to this as initial value.
      • BucketSet

        public BucketSet​(BucketSet set)
        Constructs a new bucket set that is a copy of another.
        Parameters:
        set - The set to copy.
    • Method Detail

      • intersection

        public BucketSet intersection​(BucketSet rhs)
        Returns the intersection between this bucket set and another.
        Parameters:
        rhs - The set to form an intersection with.
        Returns:
        The intersection.
      • union

        public BucketSet union​(BucketSet rhs)
        Returns the union between this bucket set and another.
        Parameters:
        rhs - The set to form a union with.
        Returns:
        The union.