All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.agrest.cayenne.processor.select.SingleColumnIterator Maven / Gradle / Ivy

There is a newer version: 5.0.M19
Show newest version
package io.agrest.cayenne.processor.select;

import java.util.Iterator;

/**
 * @since 3.4
 */
public class SingleColumnIterator implements Iterator {

    private Iterator arraysIterator;
    private int index;

    public SingleColumnIterator(Iterator arraysIterator, int index) {
        this.arraysIterator = arraysIterator;
        this.index = index;
    }

    @Override
    public boolean hasNext() {
        return arraysIterator.hasNext();
    }

    @Override
    public T next() {
        return (T) arraysIterator.next()[index];
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy