mirror of
https://github.com/corda/corda.git
synced 2025-06-17 14:48:16 +00:00
add Collections.enumeration(Collection<T> c)
This commit is contained in:
committed by
Joel Dice
parent
4dc05844df
commit
03b66375f4
@ -79,6 +79,10 @@ public class Collections {
|
|||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
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> {
|
static class IteratorEnumeration<T> implements Enumeration<T> {
|
||||||
private final Iterator<T> it;
|
private final Iterator<T> it;
|
||||||
|
Reference in New Issue
Block a user