
resources.report.rules.pmd.ReplaceEnumerationWithIterator.html Maven / Gradle / Ivy
ReplaceEnumerationWithIterator
ReplaceEnumerationWithIterator
Consider replacing this Enumeration with the newer java.util.Iterator
This rule is defined by the following XPath expression:
//ImplementsList/ClassOrInterfaceType[@Image='Enumeration']
Example:
public class Foo implements Enumeration {
private int x = 42;
public boolean hasMoreElements() {
return true;
}
public Object nextElement() {
return String.valueOf(i++);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy