Skip to content

yatechorg/common-utils

Repository files navigation

Build Status Download Coverage Status Sputnik

common-utils

A collection of common Java utilities.
See Wiki for more details and documentation.

Highlights

requireX - Argument Requirements

A set of argument requirement methods, based on the form of the Objects.requireNonNull methods introduced in JDK 8. For example:

public class Person {
  private final String name;
  private final int age;

  public Person(String name, int age) {
    this.name = StringArgs.requireNonBlank(name, "Person name is required");
    this.age = NumericArgs.requireNonNegative(age, "Person age must be non-negative");
  }
}

See more details in the requireX wiki page.