|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.javelot.functionalj.util.Strings
public final class Strings
Methods concerning Strings.
| Field Summary | |
|---|---|
static Function1<Integer,String> |
length
Function that returns the length of a String. |
| Method Summary | |
|---|---|
static String |
concat(Collection<?> p_coll)
Concatenates a Collection into a String, by concatenating together the String representations of each object in the collection. |
static String |
concat(Object[] p_array)
Version of concat(Collection) that accepts an array. |
static List<String> |
intersperse(String p_string,
List<String> p_list)
Intersperses a String in between a List of Strings, to return a new List of Strings. |
static List<String> |
intersperse(String p_string,
String[] p_strings)
Version of intersperse(String, List) that accepts an array. |
static int |
length(String p_string)
Returns the length of a string, returning zero if the string is null. |
static String |
toString(Object... p_array)
Returns a String representation of an array of objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Function1<Integer,String> length
null, the function returns 0.
| Method Detail |
|---|
public static List<String> intersperse(String p_string,
List<String> p_list)
intersperse(":", ["AB", "C", "DE", "F"])
returns ["AB", ":", "C", ":", "DE", ":", "F"].
Using concat(Collection) on that result will return
"AB:C:DE:F".
p_string - the string to intersperse into the list of strings.p_list - the list of strings.
public static List<String> intersperse(String p_string,
String[] p_strings)
intersperse(String, List) that accepts an array.
intersperse(String, List)public static String concat(Collection<?> p_coll)
p_coll - the collection to be concatenated.
public static String concat(Object[] p_array)
concat(Collection) that accepts an array.
public static String toString(Object... p_array)
p_array - the array for which to construct a String representation.
"[A, B, C, D]", with a String
representation of each object in the array.public static int length(String p_string)
null.
p_string - the string for which to return the length.
0 if the string is
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||