mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
implement Arrays.toString()
This commit is contained in:
@ -3,6 +3,19 @@ package java.util;
|
||||
public class Collections {
|
||||
private Collections() { }
|
||||
|
||||
static String toString(List l) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("[");
|
||||
for (Iterator it = l.iterator(); it.hasNext();) {
|
||||
sb.append(it.next());
|
||||
if (it.hasNext()) {
|
||||
sb.append(",");
|
||||
}
|
||||
}
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
static class IteratorEnumeration<T> implements Enumeration<T> {
|
||||
private final Iterator<T> it;
|
||||
|
||||
|
Reference in New Issue
Block a user