== Why is this an issue?

As documented in `Enumeration` 's Javadoc, you should favor the `Iterator` interface over `Enumeration`.
`Iterator` offers a similar contract to `Enumeration` with the addition of a method for removal and shorter method names.


=== Noncompliant code example

[source,java,diff-id=1,diff-type=noncompliant]
----
public class MyClass implements Enumeration {  // Noncompliant
  /* ... */
}
----


=== Compliant solution

[source,java,diff-id=1,diff-type=compliant]
----
public class MyClass implements Iterator {     // Compliant
  /* ... */
}
----

== Resources

* https://docs.oracle.com/javase/8/docs/api/java/util/Enumeration.html[docs.oracle.com] - Enumeration

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Implement Iterator rather than Enumeration.


'''
== Comments And Links
(visible only on this page)

=== on 26 Jul 2013, 13:40:52 Freddy Mallet wrote:
Is implemented by \http://jira.codehaus.org/browse/SONARJAVA-237

endif::env-github,rspecator-view[]
