
it.unitn.disi.smatch.data.trees.StartIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of s-match Show documentation
Show all versions of s-match Show documentation
A version of S-Match semantic matching framework for Open Data
The newest version!
package it.unitn.disi.smatch.data.trees;
import java.util.Iterator;
public class StartIterator implements Iterator {
private E start;
private Iterator i;
public StartIterator(E start, Iterator i) {
if (null == start) {
throw new IllegalArgumentException("argument is null");
}
this.start = start;
this.i = i;
}
public boolean hasNext() {
return (null != start || i.hasNext());
}
public E next() {
E result = start;
if (null != start) {
start = null;
} else {
result = i.next();
}
return result;
}
public void remove() {
throw new UnsupportedOperationException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy