Class HybridBitSet<E>

All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Set<E>, SetEx<E>, Copyable<SetEx<E>>

public final class HybridBitSet<E> extends AbstractHybridSet<E> implements Serializable
Hybrid set that uses bit set for large set.
See Also:
  • Constructor Details

    • HybridBitSet

      public HybridBitSet(Indexer<E> indexer, boolean isSparse)
  • Method Details

    • newLargeSet

      protected Set<E> newLargeSet(int unused)
      Description copied from class: AbstractHybridSet
      Creates a large set.
      Specified by:
      newLargeSet in class AbstractHybridSet<E>
      Parameters:
      unused - initial capacity of the resulting set.
    • addAllDiff

      public HybridBitSet<E> addAllDiff(Collection<? extends E> c)
      Description copied from interface: SetEx
      Adds all elements in collection c, and returns the difference set between c and this set (before the call).
      Specified by:
      addAllDiff in interface SetEx<E>
      Overrides:
      addAllDiff in class AbstractSetEx<E>
      Returns:
      a set of elements that are contained in c but not in this set before the call.
    • copy

      public HybridBitSet<E> copy()
      Description copied from interface: Copyable
      Creates and returns a copy of this object.
      Specified by:
      copy in interface Copyable<E>
      Overrides:
      copy in class AbstractSetEx<E>
      Returns:
      a copy of this object.