eu.toolchain.serializer.processor.ShortIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tiny-serializer-processor Show documentation
Show all versions of tiny-serializer-processor Show documentation
A processor for the @AutoSerialize annotation
The newest version!
package eu.toolchain.serializer.processor;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class ShortIterator implements Iterator {
private int index = 0;
@Override
public boolean hasNext() {
return index + 1 <= Short.MAX_VALUE;
}
@Override
public Short next() {
if (!hasNext()) {
throw new NoSuchElementException("No more positive short values available");
}
return (short) index++;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy