| 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 MessageType |
MessageType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MessageType[] |
MessageType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
Exceptions.formatMsg(MessageType msgType,
boolean inverted,
Object... msgArgs)
Formats an exception message using the format corresponding to the given
message type and the given message arguments.
|
String |
Config.getMessageFormat(MessageType type,
boolean inverted)
Returns the exception message format for the given
MessageType. |
static IllegalArgumentException |
Exceptions.illegalArgumentException(MessageType msgType,
boolean inverted,
Object[] msgArgs)
Returns an
IllegalArgumentException with a message formatted
using the format corresponding to the given message type and the given
message arguments. |
static IllegalArgumentException |
Exceptions.illegalArgumentException(MessageType msgType,
boolean inverted,
Object[] msgArgs,
Throwable cause)
Returns an
IllegalArgumentException with a message formatted
using the format corresponding to the given message type and the given
message arguments. |
| Modifier and Type | Method and Description |
|---|---|
protected C |
PrimitiveBaseCheck.check(boolean condition,
MessageType msgType,
Object... msgArgs)
A helper method that allows subclasses to perform simple checks
conveniently with a one-liner.
|
protected C |
ObjectBaseCheck.check(boolean condition,
MessageType msgType,
Object... msgArgs)
A helper method that allows subclasses to perform simple checks
conveniently with a one-liner.
|
protected C |
ObjectBaseCheck.checkWithCause(boolean condition,
MessageType msgType,
Throwable cause,
Object... msgArgs)
The same as
ObjectBaseCheck.check(boolean, MessageType, Object...) but with the
possibility to define a cause for the exception that is thrown if the
check fails. |
Copyright © 2012–2017 Michael Faes. All rights reserved.