From 8bf936b1c289ee49b01fb16d072fc57cdf6b791c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20No=C3=ABl?= Date: Tue, 8 May 2018 18:22:16 +0200 Subject: [PATCH] simplify `IteratorOfXXX` #838 --- src/main/java/org/cactoos/iterable/IterableOfBooleans.java | 2 +- src/main/java/org/cactoos/iterable/IterableOfFloats.java | 5 +---- src/main/java/org/cactoos/iterable/IterableOfInts.java | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/cactoos/iterable/IterableOfBooleans.java b/src/main/java/org/cactoos/iterable/IterableOfBooleans.java index a69c9f0b12..356ef8f78c 100644 --- a/src/main/java/org/cactoos/iterable/IterableOfBooleans.java +++ b/src/main/java/org/cactoos/iterable/IterableOfBooleans.java @@ -37,6 +37,6 @@ public final class IterableOfBooleans extends IterableEnvelope { * @param values Boolean values */ public IterableOfBooleans(final boolean... values) { - super(() -> new IterableOf<>(new IteratorOfBooleans(values))); + super(() -> () -> new IteratorOfBooleans(values)); } } diff --git a/src/main/java/org/cactoos/iterable/IterableOfFloats.java b/src/main/java/org/cactoos/iterable/IterableOfFloats.java index 9cf6b6a0c3..69288aef26 100644 --- a/src/main/java/org/cactoos/iterable/IterableOfFloats.java +++ b/src/main/java/org/cactoos/iterable/IterableOfFloats.java @@ -24,7 +24,6 @@ package org.cactoos.iterable; import org.cactoos.iterator.IteratorOfFloats; -import org.cactoos.scalar.UncheckedScalar; /** * Iterable of float values. @@ -38,8 +37,6 @@ public final class IterableOfFloats extends IterableEnvelope { * @param values Float values */ public IterableOfFloats(final float... values) { - super(() -> () - -> new UncheckedScalar<>(() -> new IteratorOfFloats(values)).value() - ); + super(() -> () -> new IteratorOfFloats(values)); } } diff --git a/src/main/java/org/cactoos/iterable/IterableOfInts.java b/src/main/java/org/cactoos/iterable/IterableOfInts.java index 9cdd8b0841..bfc135c9f6 100644 --- a/src/main/java/org/cactoos/iterable/IterableOfInts.java +++ b/src/main/java/org/cactoos/iterable/IterableOfInts.java @@ -24,7 +24,6 @@ package org.cactoos.iterable; import org.cactoos.iterator.IteratorOfInts; -import org.cactoos.scalar.UncheckedScalar; /** * Iterable of integer values. @@ -38,8 +37,6 @@ public final class IterableOfInts extends IterableEnvelope { * @param values Integer values */ public IterableOfInts(final int... values) { - super(() -> () - -> new UncheckedScalar<>(() -> new IteratorOfInts(values)).value() - ); + super(() -> () -> new IteratorOfInts(values)); } }