public class BaseUtility
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
capitalize(java.lang.String string)
Capitalize make the first letter of the word be upper case.
|
static java.lang.String |
changeCase(java.lang.String string)
It will change the case of the passing parameter into the case defined in
litepal.xml file.
|
static void |
checkConditionsCorrect(java.lang.String... conditions)
Check the number of question mark existed in conditions[0] equals the
number of rest conditions elements or not.
|
static boolean |
containsIgnoreCases(java.util.Collection<java.lang.String> collection,
java.lang.String string)
This helper method makes up the shortage of contains method in Collection
to support the function of case insensitive contains.
|
static int |
count(java.lang.String string,
java.lang.String mark)
Count how many marks existed in string.
|
static boolean |
isFieldTypeSupported(java.lang.String fieldType)
Judge a field type is supported or not.
|
static boolean |
isGenericTypeSupported(java.lang.String genericType)
Judge a generic type is supported or not.
|
static boolean |
isLitePalXMLExists()
If the litepal.xml configuration file exists.
|
public static java.lang.String changeCase(java.lang.String string)
string - The string want to change case.public static boolean containsIgnoreCases(java.util.Collection<java.lang.String> collection,
java.lang.String string)
collection - The collection contains string data.string - The string want to look for in the collection.public static java.lang.String capitalize(java.lang.String string)
string - The word to capitalize.public static int count(java.lang.String string,
java.lang.String mark)
string - The source sentence.mark - The specific substring to count.public static void checkConditionsCorrect(java.lang.String... conditions)
conditions - A string array representing the WHERE part of an SQL
statement.DataSupportExceptionpublic static boolean isFieldTypeSupported(java.lang.String fieldType)
fieldType - Type of the field.public static boolean isGenericTypeSupported(java.lang.String genericType)
genericType - Type of the generic field.public static boolean isLitePalXMLExists()