Add lint action for checkstyle
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s

Reviewed-on: #1
Co-authored-by: Josh Chester <numbers@softwaresmyth.com>
Co-committed-by: Josh Chester <numbers@softwaresmyth.com>
This commit was merged in pull request #1.
This commit is contained in:
2026-01-23 23:25:56 -06:00
committed by numbers
parent b178b31cbf
commit 003f67aecb
4 changed files with 109 additions and 1 deletions
@@ -2,18 +2,35 @@ package com.softwaresmyth.functions;
import java.util.Optional;
public class OrNot
/**
* Utility class holding the library's methods.
*/
public enum OrNot
{
; // Enum with no variants for a utility class that is not meant to be instantiated.
/**
* Method that does nothing.
* It fits any method signature that returns void.
*/
public static void noop(Object... ignored)
{
//do nothing
}
/**
* Method that does nothing.
* It fits any method signature that does not return void.
*/
public static <T> T returnNull(Object... ignored)
{
return null;
}
/**
* Method that does nothing.
* It fits any method signature that returns {@link Optional} for any type.
*/
public static <T> Optional<T> returnEmpty(Object... ignored)
{
return Optional.empty();