diff --git a/src/main/java/net/kemitix/conditional/TrueValueClause.java b/src/main/java/net/kemitix/conditional/TrueValueClause.java index 9d3fbcc..c8e7143 100644 --- a/src/main/java/net/kemitix/conditional/TrueValueClause.java +++ b/src/main/java/net/kemitix/conditional/TrueValueClause.java @@ -34,11 +34,11 @@ import java.util.function.Supplier; */ class TrueValueClause implements Value.ValueClause { - protected static final Value.ValueClause TRUE = new TrueValueClause(); + protected static final Value.ValueClause TRUE = new TrueValueClause<>(); @Override public ValueSupplier then(final Supplier trueSupplier) { - return new TrueValueSupplier(trueSupplier); + return new TrueValueSupplier<>(trueSupplier); } @Override @@ -54,11 +54,13 @@ class TrueValueClause implements Value.ValueClause { /** * An intermediate result of the {@link Value} where the clause has evaluated to true. + * + * @param the type of the value */ @RequiredArgsConstructor - private class TrueValueSupplier implements ValueSupplier { + private static final class TrueValueSupplier implements ValueSupplier { - private final transient Supplier valueSupplier; + private final Supplier valueSupplier; @Override public T otherwise(final Supplier falseSupplier) {