mirror of
https://github.com/corda/corda.git
synced 2025-03-15 16:46:12 +00:00
add Collections.enumeration(Collection<T> c)
This commit is contained in:
parent
4dc05844df
commit
03b66375f4
@ -79,6 +79,10 @@ public class Collections {
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static <T> Enumeration<T> enumeration(Collection<T> c) {
|
||||
return new IteratorEnumeration<T> (c.iterator());
|
||||
}
|
||||
|
||||
static class IteratorEnumeration<T> implements Enumeration<T> {
|
||||
private final Iterator<T> it;
|
||||
|
Loading…
x
Reference in New Issue
Block a user