Package edu.jas.util

Class PowerSet<E>

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.List<E>>

    public class PowerSet<E>
    extends java.lang.Object
    implements java.lang.Iterable<java.util.List<E>>
    Power set with iterator.
    Author:
    Heinz Kredel
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.List<E> set
      data structure.
    • Constructor Summary

      Constructors 
      Constructor Description
      PowerSet​(java.util.List<E> set)
      PowerSet constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<java.util.List<E>> iterator()
      get an iterator over subsets.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • set

        public final java.util.List<E> set
        data structure.
    • Constructor Detail

      • PowerSet

        public PowerSet​(java.util.List<E> set)
        PowerSet constructor.
        Parameters:
        set - generating set.
    • Method Detail

      • iterator

        public java.util.Iterator<java.util.List<E>> iterator()
        get an iterator over subsets.
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Returns:
        an iterator.