Небольшой рефакторинг

This commit is contained in:
Struchkov Mark 2022-07-30 10:32:11 +03:00
parent e8867426ad
commit fb9d8a0f6e
11 changed files with 21 additions and 12 deletions

View File

@ -6,7 +6,7 @@
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-bom</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>pom</packaging>
<name>Haiti BOM</name>
@ -30,7 +30,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<haiti.ver>1.2.0</haiti.ver>
<haiti.ver>${project.version}</haiti.ver>
<haiti.exception.ver>${haiti.ver}</haiti.exception.ver>
<haiti.context.ver>${haiti.ver}</haiti.context.ver>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<artifactId>haiti-context</artifactId>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<artifactId>haiti-core</artifactId>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<artifactId>haiti-exception</artifactId>

View File

@ -12,7 +12,7 @@ public class AccessException extends BasicException {
super(message);
}
public static Supplier<AccessException> supplier(String message, Object... objects) {
public static Supplier<AccessException> accessException(String message, Object... objects) {
return () -> new AccessException(MessageFormat.format(message, objects));
}

View File

@ -16,7 +16,7 @@ public class ConvertException extends BasicException {
super(message, cause);
}
public static Supplier<ConvertException> supplier(String message, Object... objects) {
public static Supplier<ConvertException> convertException(String message, Object... objects) {
return () -> new ConvertException(MessageFormat.format(message, objects));
}

View File

@ -12,7 +12,7 @@ public class CreateException extends BasicException {
super(message);
}
public static Supplier<CreateException> supplier(String message, Object... objects) {
public static Supplier<CreateException> createException(String message, Object... objects) {
return () -> new CreateException(MessageFormat.format(message, objects));
}

View File

@ -6,7 +6,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<artifactId>haiti-filter</artifactId>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<name>Haiti Utils</name>

View File

@ -3,6 +3,7 @@ package dev.struchkov.haiti.utils;
import java.util.Collection;
import static dev.struchkov.haiti.utils.Exceptions.utilityClass;
import static dev.struchkov.haiti.utils.Strings.EMPTY;
public final class Checker {
@ -40,6 +41,10 @@ public final class Checker {
}
}
public static boolean checkNotEmpty(String s) {
return !EMPTY.equals(s);
}
/**
* Проверка коллекции на пустоту.
*
@ -58,6 +63,10 @@ public final class Checker {
return args == null || args.length == 0;
}
public static boolean checkEmpty(String s) {
return EMPTY.equals(s);
}
public static boolean checkLong(String s) {
try {
Long.parseLong(s);

View File

@ -6,7 +6,7 @@
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>pom</packaging>
<name>Haiti Framework</name>
@ -39,7 +39,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<haiti.ver>1.2.0</haiti.ver>
<haiti.ver>1.3.0</haiti.ver>
<haiti.bom.ver>${haiti.ver}</haiti.bom.ver>
<haiti.exception.ver>${haiti.ver}</haiti.exception.ver>