Better Checks Core

The Better Checks library aims to provide a lightweight and concise, but powerful way for precondition checking, in particular for method arguments.

License

License

MIT License
GroupId

GroupId

ch.trick17.better-checks
ArtifactId

ArtifactId

better-checks-core
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Better Checks Core
The Better Checks library aims to provide a lightweight and concise, but powerful way for precondition checking, in particular for method arguments.
Project Organization

Project Organization

Michael Faes

Download better-checks-core

How to add to project

<!-- https://jarcasting.com/artifacts/ch.trick17.better-checks/better-checks-core/ -->
<dependency>
    <groupId>ch.trick17.better-checks</groupId>
    <artifactId>better-checks-core</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/ch.trick17.better-checks/better-checks-core/
implementation 'ch.trick17.better-checks:better-checks-core:1.1'
// https://jarcasting.com/artifacts/ch.trick17.better-checks/better-checks-core/
implementation ("ch.trick17.better-checks:better-checks-core:1.1")
'ch.trick17.better-checks:better-checks-core:jar:1.1'
<dependency org="ch.trick17.better-checks" name="better-checks-core" rev="1.1">
  <artifact name="better-checks-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='ch.trick17.better-checks', module='better-checks-core', version='1.1')
)
libraryDependencies += "ch.trick17.better-checks" % "better-checks-core" % "1.1"
[ch.trick17.better-checks/better-checks-core "1.1"]

Dependencies

test (7)

Group / Artifact Type Version
junit : junit jar 4.11
org.powermock : powermock-api-mockito jar 1.5.2
org.powermock : powermock-module-junit4-rule jar 1.5.2
org.powermock : powermock-classloading-xstream jar 1.5.2
net.trajano.commons : commons-testing jar 1.0.1
org.openjdk.jmh : jmh-core jar 1.16
org.openjdk.jmh : jmh-generator-annprocess jar 1.16

Project Modules

There are no modules declared in this project.

Better Checks build status

The Better Checks library provides a lightweight and concise, but powerful way for precodition checking in Java, in particular for method arguments. Checks are written in a fluent way.

Examples:

Check.that(name).matches("hello .*!").hasLengthBetween(0, 20);
Check.that(list).isNullOr().hasSize(0);
Check.that(args).named("arguments").isNotEmpty();

The actual checking methods, such as matches(...) or hasSize(...), all throw an exception if the check fails. The exact type of exception depends on the kind of check that is called but in most cases it is IllegalArgumentException.

Project Website

For more information, visit the project's website:

http://better-checks.trick17.ch

Versions

Version
1.1
1.0