From 271121c1508e2023c0034f5b0591bfa8526c303b Mon Sep 17 00:00:00 2001 From: Bobai Kato Date: Tue, 11 Jul 2023 15:14:03 +0100 Subject: [PATCH] Changed some new method names --- src/main/java/art/cutils/function/Condition.java | 6 +++--- src/test/java/functions/ConditionTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/art/cutils/function/Condition.java b/src/main/java/art/cutils/function/Condition.java index 85eec0e..0725ade 100644 --- a/src/main/java/art/cutils/function/Condition.java +++ b/src/main/java/art/cutils/function/Condition.java @@ -55,7 +55,7 @@ public interface Condition { * @return a composed condition that represents the short-circuiting logical NOT of this condition */ @Contract(pure = true) - static @NotNull Condition areAnyMet(final Condition @NotNull ... conditions) { + static @NotNull Condition anyMet(final Condition @NotNull ... conditions) { return () -> Arrays.stream(conditions).anyMatch(Condition::isMet); } @@ -66,7 +66,7 @@ public interface Condition { * @return a composed condition that represents the short-circuiting logical NOT of this condition */ @Contract(pure = true) - static @NotNull Condition areNoneMet(final Condition @NotNull ... conditions) { + static @NotNull Condition noneMet(final Condition @NotNull ... conditions) { return () -> Arrays.stream(conditions).noneMatch(Condition::isMet); } @@ -77,7 +77,7 @@ public interface Condition { * @return a composed condition that represents the short-circuiting logical NOT of this condition */ @Contract(pure = true) - static @NotNull Condition areAllNotMet(final Condition @NotNull ... conditions) { + static @NotNull Condition allMet(final Condition @NotNull ... conditions) { return () -> Arrays.stream(conditions).anyMatch(Condition::isNotMet); } diff --git a/src/test/java/functions/ConditionTest.java b/src/test/java/functions/ConditionTest.java index 1486f1b..6ff69bc 100644 --- a/src/test/java/functions/ConditionTest.java +++ b/src/test/java/functions/ConditionTest.java @@ -141,7 +141,7 @@ void areAnyMet() { final Condition firstCondition = () -> true; final Condition secondCondition = () -> false; - Assertions.assertTrue(Condition.areAnyMet(firstCondition, secondCondition).isMet()); + Assertions.assertTrue(Condition.anyMet(firstCondition, secondCondition).isMet()); } @Test @@ -149,7 +149,7 @@ void areNoneMet() { final Condition firstCondition = () -> false; final Condition secondCondition = () -> false; - Assertions.assertTrue(Condition.areNoneMet(firstCondition, secondCondition).isMet()); + Assertions.assertTrue(Condition.noneMet(firstCondition, secondCondition).isMet()); } @Test @@ -157,6 +157,6 @@ void areAllNotMet() { final Condition firstCondition = () -> false; final Condition secondCondition = () -> false; - Assertions.assertTrue(Condition.areAllNotMet(firstCondition, secondCondition).isMet()); + Assertions.assertTrue(Condition.allMet(firstCondition, secondCondition).isMet()); } }