public class Utilities extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
toSortedString(java.util.Collection collection,
boolean recursive)
Given a collection, return a string representation of the collection.
|
public static java.lang.String toSortedString(java.util.Collection collection, boolean recursive)
recursive
argument is true, then elements of
the collection that are themselves collections are recursively
converted to sorted strings using this method. When printing
test results, this method can be used to guarantee a consistent
representation for a collection regardless of the order in which
elements are inserted and removed.collection
- The collection.recursive
- True if elements of the collection that are themselves
collections should be recursively converted to sorted strings.