Add missing generic types

This commit is contained in:
Paul Campbell 2018-03-12 20:08:04 +00:00
parent 1830db4476
commit 7b0dc90d55

View file

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