public final class Strings extends Object
String
s.Modifier and Type | Method and Description |
---|---|
static boolean |
areEqualOrMatch(String pattern,
String s)
Indicates if the given
String s match. |
static boolean |
isDefaultToString(String s)
Returns whether the given
String is the default toString() implementation of an
Object . |
static boolean |
match(Pattern p,
CharSequence s)
Indicates if the given
CharSequence matches the given regular expression pattern. |
static boolean |
match(Pattern p,
String s)
Indicates if the given
String matches the given regular expression pattern. |
public static boolean isDefaultToString(String s)
String
is the default toString()
implementation of an
Object
.s
- the given String
.true
if the given String
is the default toString()
implementation,
false
otherwise.public static boolean areEqualOrMatch(String pattern, String s)
String
s match. To match, one of the following conditions needs to be true:
String
s have to be equals
matches the regular expression in pattern
pattern
- a String
to match (it can be a regular expression.)s
- the String
to verify.true
if the given String
s match, false
otherwise.public static boolean match(Pattern p, String s)
String
matches the given regular expression pattern.p
- the given regular expression pattern.s
- the String
to evaluate.true
if the given String
matches the given regular expression pattern,
false
otherwise. It also returns false
if the given String
is
null
.NullPointerException
- if the given regular expression pattern is null
.public static boolean match(Pattern p, CharSequence s)
CharSequence
matches the given regular expression pattern.p
- the given regular expression pattern.s
- the CharSequence
to evaluate.true
if the given CharSequence
matches the given regular expression pattern,
false
otherwise. It also returns false
if the given CharSequence
is
null
.NullPointerException
- if the given regular expression pattern is null
.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.