felix-utils

Felix Utils is a project with several utilitarian methods for working with Java. Seeks to improve code readability and provide methods for solving everyday problems.


Project maintained by felixgilioli Hosted on GitHub Pages — Theme by mattgraham

Felix Utils Java Library

Introduction

This is a library with some utilities methods for working with Java, by example:

before:

void myMethod(String name) {

  if (name == null) {
    throw new NullPointerException();
  }

  if (name.isBlank()) {
    throw new IllegalArgumentException();
  }

  // code...
}

after:

void myMethod(String name) {

  checkArgument(name, n -> n.isBlank());
  
  // code...
}

before:


users = users.stream()
             .filter(user -> user.getAge() >= 18)
             .collect(Collectors.toList());

after:


users = filter(users, user -> user.getAge() >= 18);

Adding the dependency

if you want to include the library in your project, you can do this by adding the dependency below:

Maven

<dependency>
  <groupId>io.github.felixgilioli</groupId>
  <artifactId>felix-utils</artifactId>
  <version>1.2.1</version>
</dependency>

Gradle

implementation 'io.github.felixgilioli:felix-utils:1.1.1'

Documentation

The complete project documentation can be found here.

Contribution

Pull Requests are very welcome, feel free to contribute :smiley:.