From 2d910565950724b0c12230f9874746f5c980ecdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 7 Apr 2020 10:31:00 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=8E=A8=20Use=20Java=E2=80=99s=20predicate?= =?utf8?q?=20instead=20of=20Guava=E2=80=99s?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/utils/DefaultOption.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/utils/DefaultOption.java b/src/main/java/net/pterodactylus/sone/utils/DefaultOption.java index d9acaeb..b46c58e 100644 --- a/src/main/java/net/pterodactylus/sone/utils/DefaultOption.java +++ b/src/main/java/net/pterodactylus/sone/utils/DefaultOption.java @@ -1,6 +1,6 @@ package net.pterodactylus.sone.utils; -import com.google.common.base.Predicate; +import java.util.function.Predicate; /** * Basic implementation of an {@link Option}. @@ -66,7 +66,7 @@ public class DefaultOption implements Option { */ @Override public boolean validate(T value) { - return (validator == null) || (value == null) || validator.apply(value); + return (validator == null) || (value == null) || validator.test(value); } /** @@ -74,7 +74,7 @@ public class DefaultOption implements Option { */ @Override public void set(T value) { - if ((value != null) && (validator != null) && (!validator.apply(value))) { + if ((value != null) && (validator != null) && (!validator.test(value))) { throw new IllegalArgumentException("New Value (" + value + ") could not be validated."); } this.value = value; -- 2.7.4