net.yetamine.checks

A set of utilities for compact runtime checks.

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.yetamine
Идентификатор

Идентификатор

net.yetamine.checks
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

bundle
Описание

Описание

net.yetamine.checks
A set of utilities for compact runtime checks.
Ссылка на сайт

Ссылка на сайт

https://github.com/pdolezal/net.yetamine.checks
Организация-разработчик

Организация-разработчик

Yetamine
Система контроля версий

Система контроля версий

https://github.com/pdolezal/net.yetamine.checks.git

Скачать net.yetamine.checks

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
org.testng : testng jar 6.9.10

Модули Проекта

Данный проект не имеет модулей.

net.yetamine.checks

This repository provides a tiny Java library for compact runtime checks, especially for ensuring preconditions.

Examples

An example of a more advanced use of Argument::check:

public void foo(int i) {
    // Following check throws IllegalArgumentException if not satisfied with the detailed message
    bar(Argument.check(i, i > 0, () -> String.format("Requiring a positive number (given: %d).", i)));
}

private void bar(int i) {
    assert (i > 0);
    // Doing some stuff, requiring 'i' to be positive. But this method is private
    // and therefore it relies on the callers to provide already checked values.
}

Prerequisites

For building this project is needed:

  • JDK 8 or newer.
  • Maven 3.3 or newer.

For using the built library is needed:

  • JRE 8 or newer.

Licensing

The project is licensed under the Apache 2.0 license. For previous versions of this repository the original or current license can be chosen, i.e., the current license applies as an option for all previously published content.

Contributions to the project are welcome and accepted if they can be incorporated without the need of changing the license or license conditions and terms.

Yetamine logo

Версии библиотеки

Версия
1.1.0
1.0.2
1.0.1
1.0.0