Class BufferedRowList

java.lang.Object
com.mysql.cj.result.BufferedRowList
All Implemented Interfaces:
RowList, java.util.Iterator<Row>

public class BufferedRowList
extends java.lang.Object
implements RowList
  • Field Summary

    Fields inherited from interface com.mysql.cj.result.RowList

    RESULT_SET_SIZE_UNKNOWN
  • Constructor Summary

    Constructors 
    Constructor Description
    BufferedRowList​(java.util.Iterator<Row> ris)
    Create a new instance by filling the internal buffer by draining the row stream.
    BufferedRowList​(java.util.List<Row> rowList)  
  • Method Summary

    Modifier and Type Method Description
    Row get​(int n)
    Optionally retrieve Row at index n.
    int getPosition()
    Returns the current position.
    boolean hasNext()  
    Row next()  
    Row previous()
    Optionally iterate backwards on the list.
    int size()
    Only works on non dynamic row lists.

    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, remove
  • Constructor Details

    • BufferedRowList

      public BufferedRowList​(java.util.List<Row> rowList)
    • BufferedRowList

      public BufferedRowList​(java.util.Iterator<Row> ris)
      Create a new instance by filling the internal buffer by draining the row stream.
      Parameters:
      ris - Rows iterator
  • Method Details

    • next

      public Row next()
      Specified by:
      next in interface java.util.Iterator<Row>
    • previous

      public Row previous()
      Description copied from interface: RowList
      Optionally iterate backwards on the list.
      Specified by:
      previous in interface RowList
      Returns:
      Row
    • get

      public Row get​(int n)
      Description copied from interface: RowList
      Optionally retrieve Row at index n. Only works on non dynamic row lists.
      Specified by:
      get in interface RowList
      Parameters:
      n - row number
      Returns:
      Row
    • getPosition

      public int getPosition()
      Description copied from interface: RowList
      Returns the current position.
      Specified by:
      getPosition in interface RowList
      Returns:
      the current row number
    • size

      public int size()
      Description copied from interface: RowList
      Only works on non dynamic row lists.
      Specified by:
      size in interface RowList
      Returns:
      the size of this row list
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<Row>