roboguice.util.temp
Class Strings
java.lang.Object
roboguice.util.temp.Strings
public final class Strings
- extends Object
Method Summary |
static String |
capitalize(String s)
|
static String[] |
chunk(String str,
int chunkSize)
|
static int |
copy(Reader input,
Writer output)
|
static long |
copyLarge(Reader input,
Writer output)
|
static boolean |
equals(Object a,
Object b)
|
static boolean |
equalsIgnoreCase(Object a,
Object b)
|
static boolean |
isEmpty(Object o)
|
static
|
join(String delimiter,
Collection<T> objs)
|
static
|
join(String delimiter,
T... objects)
|
static
|
joinAnd(String delimiter,
String lastDelimiter,
Collection<T> objs)
Like join, but allows for a distinct final delimiter. |
static
|
joinAnd(String delimiter,
String lastDelimiter,
T... objs)
|
static String |
md5(String s)
|
static String |
namedFormat(String str,
Map<String,String> substitutions)
|
static String |
namedFormat(String str,
Object... nameValuePairs)
|
static boolean |
notEmpty(Object o)
|
static String |
toString(InputStream input)
|
static String |
toString(Object o)
|
static String |
toString(Object o,
String def)
|
static String |
toString(Reader input)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
joinAnd
public static <T> String joinAnd(String delimiter,
String lastDelimiter,
Collection<T> objs)
- Like join, but allows for a distinct final delimiter. For english
sentences such as "Alice, Bob and Charlie" use ", " and " and " as the
delimiters.
- Type Parameters:
T
- the type- Parameters:
delimiter
- usually ", "lastDelimiter
- usually " and "objs
- the objects
- Returns:
- a string
joinAnd
public static <T> String joinAnd(String delimiter,
String lastDelimiter,
T... objs)
join
public static <T> String join(String delimiter,
Collection<T> objs)
join
public static <T> String join(String delimiter,
T... objects)
toString
public static String toString(InputStream input)
toString
public static String toString(Reader input)
copy
public static int copy(Reader input,
Writer output)
copyLarge
public static long copyLarge(Reader input,
Writer output)
toString
public static String toString(Object o)
toString
public static String toString(Object o,
String def)
isEmpty
public static boolean isEmpty(Object o)
notEmpty
public static boolean notEmpty(Object o)
md5
public static String md5(String s)
capitalize
public static String capitalize(String s)
equals
public static boolean equals(Object a,
Object b)
equalsIgnoreCase
public static boolean equalsIgnoreCase(Object a,
Object b)
chunk
public static String[] chunk(String str,
int chunkSize)
namedFormat
public static String namedFormat(String str,
Map<String,String> substitutions)
namedFormat
public static String namedFormat(String str,
Object... nameValuePairs)
Copyright © 2012-2014. All Rights Reserved.