Class Interpreter.ListSource

  • All Implemented Interfaces:
    java.lang.AutoCloseable, Source
    Enclosing class:
    Interpreter

    private static class Interpreter.ListSource
    extends java.lang.Object
    implements Source
    Implementation of Source using a ArrayDeque.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Iterator<Row> iterator  
      private java.util.ArrayDeque<Row> list  
    • Constructor Summary

      Constructors 
      Constructor Description
      ListSource​(java.util.ArrayDeque<Row> list)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Row receive()
      Reads a row.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • list

        private final java.util.ArrayDeque<Row> list
      • iterator

        private java.util.Iterator<Row> iterator
    • Constructor Detail

      • ListSource

        ListSource​(java.util.ArrayDeque<Row> list)
    • Method Detail

      • receive

        public Row receive()
        Description copied from interface: Source
        Reads a row. Null means end of data.
        Specified by:
        receive in interface Source
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Source