commons-file/src/main/java/info/monitorenter/util/StringUtil.java
public static final int longestStringRepresentation(final List<Object> objects) {
    int result;
    if (objects == null) {
      result = 0;
    } else {
      int maxsize = 0;
      int tint = 0;
      String tmp;
      int stop = objects.size();
      for (int i = 0; i < stop; i++) {
        tmp = StringUtil.arrayToString(objects.get(i));
        tint = tmp.length();
        if (tint > maxsize) {
          maxsize = tint;
        }
      }
      // maximum size known.
      result = maxsize;
    }
    return result;
  }
public static final int longestStringRepresentation(final List<Object> objects) {
    int result;
    if (objects == null) {
      result = 0;
    } else {
      int maxsize = 0;
      int tint = 0;
      String tmp;
      int stop = objects.size();
      for (int i = 0; i < stop; i++) {
        tmp = StringUtil.arrayToString(objects.get(i));
        tint = tmp.length();
        if (tint > maxsize) {
          maxsize = tint;
        }
      }
      // maximum size known.
      result = maxsize;
    }
    return result;
  }
Returns the maximum length of a {@link Object#toString()} result in
characters within the given List.
<p>

No data is changed in the given List at all. But the String -
representation of all Objects, even Arrays is build to inspect. <br>
Convention for creation fo String - representation: <br>

<pre>
Primitive Arrays : as performed by this classes @see #ArrayToString.
Object Arrays    : as performed by this classes @see #ArrayToString
other Objects    : toString()  (as performed by this classes @see #ArrayToString).
</pre>

@param objects
the <code>List&lt;Object&gt;</code> to inspect for the maximum
length of a {@link Object#toString()} result.

@return The length of the longest String - representation of an Object in
the List <b>or 0 if objects was null or of size 0. </b>