Top Fields Constructors Methods
com.mysql.cj.result

public Class BufferedRowList

extends Object
implements RowList
Class Inheritance
All Implemented Interfaces
com.mysql.cj.result.RowList, java.util.Iterator
Imports
java.util.Iterator, .List, .NoSuchElementException, .Spliterators, java.util.stream.Collectors, .StreamSupport

Field Summary

Modifier and TypeField and Description
private int
private List<Row>

Constructor Summary

AccessConstructor and Description
public
public
BufferedRowList(Iterator<Row>
Rows iterator
ris
)

Create a new instance by filling the internal buffer by draining the row stream.

Method Summary

Modifier and TypeMethod and Description
public Row
get(int
row number
n
)

Overrides default com.mysql.cj.result.RowList.get.

Optionally retrieve Row at index n.

public int
getPosition()

Overrides default com.mysql.cj.result.RowList.getPosition.

Returns the current position.

public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public Row
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public Row
previous()

Overrides default com.mysql.cj.result.RowList.previous.

Optionally iterate backwards on the list.

public int
size()

Overrides default com.mysql.cj.result.RowList.size.

Only works on non dynamic row lists.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

positionback to summary
private int position
rowListback to summary
private List<Row> rowList

Constructor Detail

BufferedRowListback to summary
public BufferedRowList(List<Row> rowList)
BufferedRowListback to summary
public BufferedRowList(Iterator<Row> ris)

Create a new instance by filling the internal buffer by draining the row stream.

Parameters
ris:Iterator<Row>

Rows iterator

Method Detail

getback to summary
public Row get(int n)

Overrides default com.mysql.cj.result.RowList.get.

Doc from com.mysql.cj.result.RowList.get.

Optionally retrieve Row at index n. Only works on non dynamic row lists.

Parameters
n:int

row number

Returns:Row

Row

Annotations
@Override
getPositionback to summary
public int getPosition()

Overrides default com.mysql.cj.result.RowList.getPosition.

Doc from com.mysql.cj.result.RowList.getPosition.

Returns the current position.

Returns:int

the current row number

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public Row next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Row

the next element in the iteration

Annotations
@Override
previousback to summary
public Row previous()

Overrides default com.mysql.cj.result.RowList.previous.

Doc from com.mysql.cj.result.RowList.previous.

Optionally iterate backwards on the list.

Returns:Row

Row

Annotations
@Override
sizeback to summary
public int size()

Overrides default com.mysql.cj.result.RowList.size.

Doc from com.mysql.cj.result.RowList.size.

Only works on non dynamic row lists.

Returns:int

the size of this row list

Annotations
@Override