From 07f4af34257a4098f8c8f4f0d3a0bf60c94031c1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 24 Apr 2017 13:34:36 +0100 Subject: [PATCH] Value: use lombok to replace constructor --- src/main/java/net/kemitix/conditional/Value.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/kemitix/conditional/Value.java b/src/main/java/net/kemitix/conditional/Value.java index 35618df..453b43b 100644 --- a/src/main/java/net/kemitix/conditional/Value.java +++ b/src/main/java/net/kemitix/conditional/Value.java @@ -21,6 +21,8 @@ package net.kemitix.conditional; +import lombok.RequiredArgsConstructor; + import java.util.function.Supplier; /** @@ -158,14 +160,11 @@ public interface Value { /** * An intermediate result of the {@link Value} where the clause has evaluated to true. */ + @RequiredArgsConstructor private class TrueValueSupplier implements ValueSupplier { private final Supplier valueSupplier; - TrueValueSupplier(final Supplier valueSupplier) { - this.valueSupplier = valueSupplier; - } - @Override public T otherwise(final Supplier falseSupplier) { return valueSupplier.get();