
com.tinkerpop.pipes.util.ExpandablePipe Maven / Gradle / Ivy
package com.tinkerpop.pipes.util;
import com.tinkerpop.pipes.AbstractPipe;
import java.util.LinkedList;
import java.util.Queue;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class ExpandablePipe extends AbstractPipe {
protected Queue queue = new LinkedList();
public S processNextStart() {
if (!this.queue.isEmpty())
return this.queue.remove();
else
return this.starts.next();
}
public void add(S s) {
this.queue.add(s);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy