panda.net.nntp.NewsgroupIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-nets Show documentation
Show all versions of panda-nets Show documentation
Panda Nets is a client side library of many basic Internet protocols.
package panda.net.nntp;
import java.util.Iterator;
/**
* Class which wraps an {@code Iterable} of raw newgroup information to generate an
* {@code Iterable} of the parsed information.
*/
class NewsgroupIterator implements Iterator, Iterable {
private final Iterator stringIterator;
public NewsgroupIterator(Iterable iterableString) {
stringIterator = iterableString.iterator();
}
@Override
public boolean hasNext() {
return stringIterator.hasNext();
}
// @Override
public NewsgroupInfo next() {
String line = stringIterator.next();
return NNTPClient.__parseNewsgroupListEntry(line);
}
// @Override
public void remove() {
stringIterator.remove();
}
// @Override
public Iterator iterator() {
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy