Class BitSetSet

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

    public class BitSetSet
    extends AbstractSet<java.lang.Integer>
    implements java.util.Set<java.lang.Integer>, java.util.SortedSet<java.lang.Integer>
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  BitSetSet.BitIterator  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.BitSet bitset  
      private static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(java.lang.Integer e)  
      boolean addAll​(java.util.Collection<? extends java.lang.Integer> c)  
      void addAll​(BitSetSet bss)  
      void addRange​(int start, int end)  
      void clear()  
      BitSetSet clone()  
      java.util.Comparator<? super java.lang.Integer> comparator()  
      boolean contains​(java.lang.Object o)  
      boolean containsAll​(java.util.Collection<?> c)  
      java.lang.Integer first()  
      java.util.SortedSet<java.lang.Integer> headSet​(java.lang.Integer toElement)  
      boolean isEmpty()  
      java.util.Iterator<java.lang.Integer> iterator()  
      java.lang.Integer last()  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      boolean retainAll​(java.util.Collection<?> c)  
      int size()  
      java.util.SortedSet<java.lang.Integer> subSet​(java.lang.Integer fromElement, java.lang.Integer toElement)  
      java.util.SortedSet<java.lang.Integer> tailSet​(java.lang.Integer fromElement)  
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] a)  
      java.lang.String toString()  
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode
      • Methods inherited from class java.lang.Object

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

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

        forEach
      • Methods inherited from interface java.util.Set

        equals, hashCode
      • Methods inherited from interface java.util.SortedSet

        spliterator
    • Field Detail

      • bitset

        private final java.util.BitSet bitset
    • Constructor Detail

      • BitSetSet

        public BitSetSet()
      • BitSetSet

        public BitSetSet​(BitSetSet source)
    • Method Detail

      • add

        public boolean add​(java.lang.Integer e)
        Specified by:
        add in interface java.util.Collection<java.lang.Integer>
        Specified by:
        add in interface java.util.Set<java.lang.Integer>
        Specified by:
        add in class AbstractSet<java.lang.Integer>
      • addRange

        public void addRange​(int start,
                             int end)
      • addAll

        public boolean addAll​(java.util.Collection<? extends java.lang.Integer> c)
        Specified by:
        addAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        addAll in interface java.util.Set<java.lang.Integer>
        Overrides:
        addAll in class java.util.AbstractCollection<java.lang.Integer>
      • addAll

        public void addAll​(BitSetSet bss)
      • clone

        public BitSetSet clone()
        Overrides:
        clone in class java.lang.Object
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<java.lang.Integer>
        Specified by:
        clear in interface java.util.Set<java.lang.Integer>
        Specified by:
        clear in class AbstractSet<java.lang.Integer>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<java.lang.Integer>
        Specified by:
        contains in interface java.util.Set<java.lang.Integer>
        Specified by:
        contains in class AbstractSet<java.lang.Integer>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        containsAll in interface java.util.Set<java.lang.Integer>
        Overrides:
        containsAll in class java.util.AbstractCollection<java.lang.Integer>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<java.lang.Integer>
        Specified by:
        isEmpty in interface java.util.Set<java.lang.Integer>
        Overrides:
        isEmpty in class java.util.AbstractCollection<java.lang.Integer>
      • iterator

        public java.util.Iterator<java.lang.Integer> iterator()
        Specified by:
        iterator in interface java.util.Collection<java.lang.Integer>
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Integer>
        Specified by:
        iterator in interface java.util.Set<java.lang.Integer>
        Specified by:
        iterator in class java.util.AbstractCollection<java.lang.Integer>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<java.lang.Integer>
        Specified by:
        remove in interface java.util.Set<java.lang.Integer>
        Specified by:
        remove in class AbstractSet<java.lang.Integer>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        removeAll in interface java.util.Set<java.lang.Integer>
        Overrides:
        removeAll in class AbstractSet<java.lang.Integer>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<java.lang.Integer>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        retainAll in interface java.util.Set<java.lang.Integer>
        Overrides:
        retainAll in class java.util.AbstractCollection<java.lang.Integer>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<java.lang.Integer>
        Specified by:
        size in interface java.util.Set<java.lang.Integer>
        Specified by:
        size in class java.util.AbstractCollection<java.lang.Integer>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<java.lang.Integer>
        Specified by:
        toArray in interface java.util.Set<java.lang.Integer>
        Overrides:
        toArray in class java.util.AbstractCollection<java.lang.Integer>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<java.lang.Integer>
        Specified by:
        toArray in interface java.util.Set<java.lang.Integer>
        Overrides:
        toArray in class java.util.AbstractCollection<java.lang.Integer>
      • comparator

        public java.util.Comparator<? super java.lang.Integer> comparator()
        Specified by:
        comparator in interface java.util.SortedSet<java.lang.Integer>
      • first

        public java.lang.Integer first()
        Specified by:
        first in interface java.util.SortedSet<java.lang.Integer>
      • headSet

        public java.util.SortedSet<java.lang.Integer> headSet​(java.lang.Integer toElement)
        Specified by:
        headSet in interface java.util.SortedSet<java.lang.Integer>
      • last

        public java.lang.Integer last()
        Specified by:
        last in interface java.util.SortedSet<java.lang.Integer>
      • subSet

        public java.util.SortedSet<java.lang.Integer> subSet​(java.lang.Integer fromElement,
                                                             java.lang.Integer toElement)
        Specified by:
        subSet in interface java.util.SortedSet<java.lang.Integer>
      • tailSet

        public java.util.SortedSet<java.lang.Integer> tailSet​(java.lang.Integer fromElement)
        Specified by:
        tailSet in interface java.util.SortedSet<java.lang.Integer>