Class DefaultFormulaStream<S extends Formula>

  • Type Parameters:
    S - The type of formulas
    All Implemented Interfaces:
    java.util.Iterator<S>, FormulaStream<S>

    public class DefaultFormulaStream<S extends Formula>
    extends java.lang.Object
    implements FormulaStream<S>
    This class models a default stream on the formulas of a given collection.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Collection<S> formulas
      The collection of formulas.
      private java.util.Iterator<S> it
      The actual iterator.
      private boolean neverending
      Whether this stream is never-ending (formulas are repeated once through).
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultFormulaStream​(java.util.Collection<S> formulas)
      Creates a new default stream with the given formulas that ends after all formulas have been streamed.
      DefaultFormulaStream​(java.util.Collection<S> formulas, boolean neverending)
      Creates a new default stream with the given formulas.
    • Method Summary

      Modifier and Type Method Description
      boolean hasNext()  
      S next()  
      void remove()  
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Field Detail

      • formulas

        private java.util.Collection<S extends Formula> formulas
        The collection of formulas.
      • neverending

        private boolean neverending
        Whether this stream is never-ending (formulas are repeated once through).
      • it

        private java.util.Iterator<S extends Formula> it
        The actual iterator.
    • Constructor Detail

      • DefaultFormulaStream

        public DefaultFormulaStream​(java.util.Collection<S> formulas)
        Creates a new default stream with the given formulas that ends after all formulas have been streamed.
        Parameters:
        formulas - a collection of formulas.
      • DefaultFormulaStream

        public DefaultFormulaStream​(java.util.Collection<S> formulas,
                                    boolean neverending)
        Creates a new default stream with the given formulas.
        Parameters:
        formulas - a collection of formulas.
        neverending - whether this stream is never-ending (formulas are repeated once through).