public class StringUtils extends Object
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getClassname(Class<?> clazz)
Returns the name of the class without the package name.
|
static String |
getClassname(String classname)
Returns the name of the class without the package name.
|
static boolean |
is(String str)
helper for string null and empty checking
|
static String |
join(List<String> strs) |
static String |
join(String[] strs) |
static StringBuilder |
join(StringBuilder builder,
Collection<String> strs) |
static StringBuilder |
join(StringBuilder builder,
String[] strs) |
static String[] |
joinStringArrays(String[] arr1,
String... arr2)
Joins the two given arrays, removing dup elements.
|
static int |
parseInt(String str,
int defaultValue) |
static LinkedHashSet<Set<String>> |
powerset(String[] set)
Returns the power set from the given set by using a binary counter
Example: S = {a,b,c}
P(S) = {[], [c], [b], [b, c], [a], [a, c], [a, b], [a, b, c]}
|
public static String[] joinStringArrays(String[] arr1, String... arr2)
public static StringBuilder join(StringBuilder builder, Collection<String> strs)
public static StringBuilder join(StringBuilder builder, String[] strs)
public static boolean is(String str)
public static LinkedHashSet<Set<String>> powerset(String[] set)
set
- String[]public static int parseInt(String str, int defaultValue)
public static String getClassname(Class<?> clazz)
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.