com.buabook.kdb.data.KdbTableIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-kdb-communication Show documentation
Show all versions of java-kdb-communication Show documentation
Java library to publish data into and query data out of kdb+ processes (c) 2017 Sport Trades Ltd
The newest version!
package com.buabook.kdb.data;
import java.util.Iterator;
/**
* Iterator for {@link KdbTable}
* The iterator for {@link KdbTable} to allow iteration over the table with the {@link KdbDict} class.
* (c) 2014 - 2017 Sport Trades Ltd
*
* @see KdbTable
*
* @author Jas Rajasansir
* @version 1.1.0
* @since 11 Aug 2014
*/
class KdbTableIterator implements Iterator {
private int rowCounter;
private final KdbTable table;
public KdbTableIterator(KdbTable table) {
this.rowCounter = 0;
this.table = table;
}
@Override
public boolean hasNext() {
return rowCounter < table.getRowCount();
}
@Override
public KdbDict next() {
KdbDict next = table.getRow(rowCounter);
rowCounter++;
return next;
}
@Override
public void remove() {}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy