|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.utils.StringMatchUtils
public final class StringMatchUtils
Strings matching utility class.
This class contains the utility methods for the strings.
| Field Summary | |
|---|---|
static String |
EMPTY_STRING
|
| Method Summary | |
|---|---|
static boolean |
containsAllOf(String haystack,
List<String> needles)
|
static boolean |
containsAllOf(String haystack,
String... needles)
|
static boolean |
containsAnyOf(String userAgent,
String... needles)
|
static boolean |
containsAnyOfIgnoreCase(String userAgent,
String... needles)
|
static int |
firstSemiColon(String target)
|
static int |
firstSlash(String target)
Return the position of first slash of the userAgent string. |
static int |
firstSpace(String target)
Return the position of first space of the given string. |
static String |
format(Set<String> mozillaData)
|
static String |
hierarchyAsString(List<ModelDevice> hierarchy)
Display a device hierarchy as String: generic -> ... |
static int |
indexOf(String userAgent,
String key)
|
static int |
indexOfAnyOrLength(String userAgent,
String... needles)
|
static int |
indexOfAnyOrLength(String userAgent,
String[] needles,
int startIndex)
|
static int |
indexOfOrLength(String target,
String needle)
|
static int |
indexOfOrLength(String target,
String needle,
int startIndex)
|
static String |
ldMatch(Set<String> candidates,
String needle,
int tolerance)
This method use the LDMatcher to search the given needle. |
static int |
ordinalIndexOfOrLength(String target,
String needle,
int ordinal)
|
static int |
ordinalIndexOfOrLength(String target,
String needle,
int ordinal,
int startIndex)
|
static String |
removeSubstringBefore(String userAgent,
String needle)
|
static String |
risMatch(Set<String> candidates,
String needle,
int tolerance)
This method use the RISMatcher to search the given needle. |
static int |
secondSlash(String target)
Return the index of second of the given string. |
static boolean |
startsWithAnyOf(String userAgent,
String... strings)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EMPTY_STRING
| Method Detail |
|---|
public static int firstSlash(String target)
target - A string to search first slash
public static int secondSlash(String target)
target - A string on which find second slash.
public static int firstSemiColon(String target)
public static int firstSpace(String target)
target - A string to search first slash
public static int indexOfOrLength(String target,
String needle)
public static int indexOfOrLength(String target,
String needle,
int startIndex)
public static int ordinalIndexOfOrLength(String target,
String needle,
int ordinal)
public static int ordinalIndexOfOrLength(String target,
String needle,
int ordinal,
int startIndex)
public static String risMatch(Set<String> candidates,
String needle,
int tolerance)
RISMatcher to search the given needle.
needle - String to searchcandidates - Strings to search againsttolerance - The tolerance to use in matching.RISMatcher.match(Set, String, int)
public static String ldMatch(Set<String> candidates,
String needle,
int tolerance)
LDMatcher to search the given needle.
needle - String to searchcandidates - Strings to search againsttolerance - The tolerance to use in matching.LDMatcher.match(Set, String, int)public static String hierarchyAsString(List<ModelDevice> hierarchy)
hierarchy - The hierarchy to convert.
public static int indexOf(String userAgent,
String key)
public static String removeSubstringBefore(String userAgent,
String needle)
public static boolean containsAnyOf(String userAgent,
String... needles)
public static boolean containsAnyOfIgnoreCase(String userAgent,
String... needles)
public static boolean startsWithAnyOf(String userAgent,
String... strings)
public static int indexOfAnyOrLength(String userAgent,
String... needles)
public static int indexOfAnyOrLength(String userAgent,
String[] needles,
int startIndex)
public static boolean containsAllOf(String haystack,
String... needles)
public static boolean containsAllOf(String haystack,
List<String> needles)
public static String format(Set<String> mozillaData)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||