This project has retired. For details please refer to its Attic page.
StringUtils (Apache Gora 0.2 API)

org.apache.gora.util
Class StringUtils

java.lang.Object
  extended by org.apache.gora.util.StringUtils

public class StringUtils
extends Object

An utility class for String related functionality.


Constructor Summary
StringUtils()
           
 
Method Summary
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]}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

joinStringArrays

public static String[] joinStringArrays(String[] arr1,
                                        String... arr2)
Joins the two given arrays, removing dup elements.


join

public static String join(List<String> strs)

join

public static String join(String[] strs)

join

public static StringBuilder join(StringBuilder builder,
                                 Collection<String> strs)

join

public static StringBuilder join(StringBuilder builder,
                                 String[] strs)

is

public static boolean is(String str)
helper for string null and empty checking


powerset

public 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]}

Parameters:
set - String[]
Returns:
LinkedHashSet

parseInt

public static int parseInt(String str,
                           int defaultValue)

getClassname

public static String getClassname(Class<?> clazz)
Returns the name of the class without the package name.


getClassname

public static String getClassname(String classname)
Returns the name of the class without the package name.



Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.