Returns a string representation of iterator, with the format [e1, e2, ..., en]. The iterator will be left exhausted: its hasNext() method will return false.
(Iterator<?> iterator)
| 306 | |
| 307 | |
| 308 | public static String toString(Iterator<?> iterator) { |
| 309 | return Collections2.STANDARD_JOINER.appendTo(new StringBuilder().append('['), iterator).append(']').toString(); |
| 310 | } |
| 311 | |
| 312 | /** |
| 313 | * Returns the single element contained in {@code iterator}. |