mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
add Collections.enumeration(Collection<T> c)
This commit is contained in:
committed by
Joel Dice
parent
4dc05844df
commit
03b66375f4
@ -80,6 +80,10 @@ public class Collections {
|
|||||||
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