|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.af.commons.tools.ListTools
public class ListTools
| Constructor Summary | |
|---|---|
ListTools()
|
|
| Method Summary | ||
|---|---|---|
static
|
copyAndAdd(List<E> xs,
E x)
Copies a list (shallow copy) and adds an element at the end. |
|
static
|
toString(List<E> xs)
Converts a list to a list of strings by calling toString on every entry. |
|
static String[] |
toStringArray(List xs)
Converts a List to an array of Strings by calling toString on every entry. |
|
static
|
transform(List<E> xs,
String method)
Transforms a list by calling a method on every element of the list by using reflection. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListTools()
| Method Detail |
|---|
public static String[] toStringArray(List xs)
xs - The list.
public static <E> List<String> toString(List<E> xs)
xs - The list.
public static <E,F> List<F> transform(List<E> xs,
String method)
E - Base type of the list.F - Type that the call to method returnsxs - The list.method - The name of the method to call.
public static <E> List<E> copyAndAdd(List<E> xs,
E x)
E - Type for the list.xs - The list.x - The Element to add.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||