[jOOQ/jOOQ#9505] Versions extends Iterable<Version>
This commit is contained in:
parent
4b3dcb8248
commit
9d6e8236a1
@ -38,11 +38,13 @@
|
||||
package org.jooq;
|
||||
|
||||
/**
|
||||
* A directed, acyclic graph of {@link Version} objects
|
||||
* A directed, acyclic graph of {@link Version} objects.
|
||||
* <p>
|
||||
* The graph is exposed as {@link Iterable} in no defined iteration order.
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface Versions {
|
||||
public interface Versions extends Iterable<Version> {
|
||||
|
||||
/**
|
||||
* The root version of this graph.
|
||||
|
||||
@ -39,6 +39,7 @@ package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jooq.Version;
|
||||
@ -81,4 +82,9 @@ final class VersionsImpl implements Versions {
|
||||
public final Version get(String id) {
|
||||
return versions.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Iterator<Version> iterator() {
|
||||
return versions.values().iterator();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user