fulmine.util.collection
Class CollectionUtils

java.lang.Object
  extended by fulmine.util.collection.CollectionUtils

public abstract class CollectionUtils
extends Object

Useful utility methods for Collection instances.

Author:
Ramon Servadei

Constructor Summary
CollectionUtils()
           
 
Method Summary
static StringBuilder toFormattedString(Collection collection)
          Get a formatted string for the collection.
static StringBuilder toFormattedString(Map map)
          Get a formatted string for the map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionUtils

public CollectionUtils()
Method Detail

toFormattedString

public static StringBuilder toFormattedString(Collection collection)
Get a formatted string for the collection. Each element is printed on a new line.

Parameters:
collection - the collection to produce the formatted string for
Returns:
a StringBuilder with each element of the collection printed on a new line.

toFormattedString

public static StringBuilder toFormattedString(Map map)
Get a formatted string for the map. Each map entry is printed on a new line.

Parameters:
map - the map to produce the formatted string for
Returns:
a StringBuilder with each map entry of the collection printed on a new line.


Copyright © 2007-2009. All Rights Reserved.