Class SubsetIterator<T>

  • Type Parameters:
    T - The elements of the set
    All Implemented Interfaces:
    java.util.Iterator<java.util.Set<T>>
    Direct Known Subclasses:
    DefaultSubsetIterator, IncreasingSubsetIterator, RandomSubsetIterator

    public abstract class SubsetIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<java.util.Set<T>>
    Iterates over all subsets of a given set.
    Author:
    Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      SubsetIterator​(java.util.Set<T> set)
      Creates a new subset iterator for the given set.
    • Method Summary

      Modifier and Type Method Description
      abstract boolean hasNext()  
      abstract java.util.Set<T> next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • SubsetIterator

        public SubsetIterator​(java.util.Set<T> set)
        Creates a new subset iterator for the given set.
        Parameters:
        set - some set.
    • Method Detail

      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>
      • hasNext

        public abstract boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public abstract java.util.Set<T> next()
        Specified by:
        next in interface java.util.Iterator<T>