io.quarkus.resteasy.reactive.server.servlet.runtime.EnumerationIterable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-rest-servlet Show documentation
Show all versions of quarkus-rest-servlet Show documentation
Servlet support for Quarkus REST
The newest version!
package io.quarkus.resteasy.reactive.server.servlet.runtime;
import java.util.Enumeration;
import java.util.Iterator;
/**
* Single shot wrapper for an enum that allows it to be used in for-each loops
*
* @param
*/
public class EnumerationIterable implements Iterable, Iterator {
private final Enumeration enumeration;
public EnumerationIterable(Enumeration enumeration) {
this.enumeration = enumeration;
}
@Override
public Iterator iterator() {
return this;
}
@Override
public boolean hasNext() {
return enumeration.hasMoreElements();
}
@Override
public T next() {
return enumeration.nextElement();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy