org.kuali.maven.plugins.graph.tree
Class Helper

java.lang.Object
  extended by org.kuali.maven.plugins.graph.tree.Helper

public class Helper
extends Object

General purpose utility methods


Field Summary
static String COMMA
           
static String EMPTY_STRING
           
 
Constructor Summary
Helper()
           
 
Method Summary
static
<T> void
addAll(Collection<T> to, Collection<T> from)
          Null safe method for adding all the elements in "from" to "to"
static
<T> org.apache.commons.collections15.list.SetUniqueList<T>
decorate()
           
static
<T> org.apache.commons.collections15.map.ListOrderedMap<String,String>
describe(T element, List<String> properties)
           
static
<T> org.apache.commons.collections15.map.ListOrderedMap<String,String>
describe(T element, String... properties)
           
static
<T> Object
getProperty(T bean, String property)
           
static boolean isBlank(String s)
          True if the string is null or whitespace only, false otherwise
static boolean isEmpty(Collection<?> c)
          True if the collection is null or has no elements, false otherwise
static List<String> splitAndTrimCSVToList(String csv)
          Return a List (never null) created from the csv string.
static String[] toArray(List<String> strings)
           
static
<T> String
toCSV(List<T> list)
           
static String toEmpty(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMA

public static final String COMMA
See Also:
Constant Field Values

EMPTY_STRING

public static final String EMPTY_STRING
See Also:
Constant Field Values
Constructor Detail

Helper

public Helper()
Method Detail

getProperty

public static final <T> Object getProperty(T bean,
                                           String property)

toCSV

public static final <T> String toCSV(List<T> list)

describe

public static final <T> org.apache.commons.collections15.map.ListOrderedMap<String,String> describe(T element,
                                                                                                    String... properties)

describe

public static final <T> org.apache.commons.collections15.map.ListOrderedMap<String,String> describe(T element,
                                                                                                    List<String> properties)

decorate

public static final <T> org.apache.commons.collections15.list.SetUniqueList<T> decorate()

toArray

public static final String[] toArray(List<String> strings)

toEmpty

public static final String toEmpty(String s)

addAll

public static final <T> void addAll(Collection<T> to,
                                    Collection<T> from)
Null safe method for adding all the elements in "from" to "to"


isEmpty

public static final boolean isEmpty(Collection<?> c)
True if the collection is null or has no elements, false otherwise


isBlank

public static final boolean isBlank(String s)
True if the string is null or whitespace only, false otherwise


splitAndTrimCSVToList

public static final List<String> splitAndTrimCSVToList(String csv)
Return a List (never null) created from the csv string. Each csv token is trimmed before being added to the List. If the csv string is null or contains only whitespace an empty list is returned.



Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.