Class BucketSet

All Implemented Interfaces:
Serializable, Cloneable, Iterable<BucketId>, Collection<BucketId>, Set<BucketId>

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

    • 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 Details

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