| Package | Description |
|---|---|
| ch.trick17.betterchecks | |
| ch.trick17.betterchecks.fluent |
Contains all fluent check classes, like
IntCheck,
StringCheck and many more. |
| Modifier and Type | Method and Description |
|---|---|
static StringCheck |
CompactChecks.check(String argument)
|
static StringCheck |
Check.that(String argument)
Returns a
StringCheck which can be use to check various
properties of a String, e.g. |
| Modifier and Type | Method and Description |
|---|---|
StringCheck |
StringCheck.contains(CharSequence sequence)
Checks that the string argument contains the given character sequence,
throwing an exception otherwise.
|
StringCheck |
StringCheck.containsAll(CharSequence... sequences)
Checks that the string argument contains all one of the given character
sequences, throwing an exception otherwise.
|
StringCheck |
StringCheck.containsAny(CharSequence... sequences)
Checks that the string argument contains at least one of the given
character sequences, throwing an exception otherwise.
|
StringCheck |
StringCheck.endsWith(String suffix)
Checks that the string argument end with the given string, throwing an
exception otherwise.
|
StringCheck |
UrlCheck.hasAuthorityWhich()
Creates an
StringCheck property check for the authority of the
URL argument. |
StringCheck |
UrlCheck.hasFileWhich()
Creates an
StringCheck property check for the file of the
URL argument. |
StringCheck |
UrlCheck.hasHostWhich()
Creates an
StringCheck property check for the host of the
URL argument. |
StringCheck |
StringCheck.hasLength(int length)
Checks that the string argument has the given length, throwing an
exception otherwise.
|
StringCheck |
StringCheck.hasLengthBetween(int min,
int max)
Checks that the string argument's length is between the two given
numbers, throwing an exception otherwise.
|
StringCheck |
UrlCheck.hasPathWhich()
Creates an
StringCheck property check for the path of the
URL argument. |
StringCheck |
UrlCheck.hasProtocolWhich()
Creates an
StringCheck property check for the protocol of the
URL argument. |
StringCheck |
UrlCheck.hasQueryWhich()
Creates an
StringCheck property check for the query of the
URL argument. |
StringCheck |
UrlCheck.hasRefWhich()
Creates an
StringCheck property check for the reference (or the
anchor) of the URL argument. |
StringCheck |
UrlCheck.hasUserInfoWhich()
Creates an
StringCheck property check for the user info of the
URL argument. |
StringCheck |
StringCheck.is(String string)
Checks that the string argument is the same string as the given one, throwing an
exception otherwise.
|
StringCheck |
StringCheck.isInt()
Checks that the string argument is is a valid
int, throwing
an exception otherwise. |
StringCheck |
StringCheck.isNotEmpty()
Checks that the string argument is not empty, throwing an exception
otherwise.
|
StringCheck |
StringCheck.isNotWhitespace()
Checks that the string argument is not empty and does not consist
entirely of whitespace, throwing an exception otherwise.
|
StringCheck |
StringCheck.isUrl()
Checks that the string argument is is a valid URL, throwing an exception
otherwise.
|
StringCheck |
StringCheck.matches(Pattern regex)
Checks that the string argument matches the given compiled regular
expression pattern, throwing an exception otherwise.
|
StringCheck |
StringCheck.matches(String regex)
Checks that the string argument matches the given regular expression,
throwing an exception otherwise.
|
StringCheck |
StringCheck.startsWith(String prefix)
Checks that the string argument starts with the given string, throwing an
exception otherwise.
|
Copyright © 2012–2017 Michael Faes. All rights reserved.