Skip to content

Commit

Permalink
simplify IteratorOfXXX #838
Browse files Browse the repository at this point in the history
  • Loading branch information
victornoel committed May 15, 2018
1 parent ad3b12f commit 8bf936b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/cactoos/iterable/IterableOfBooleans.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public final class IterableOfBooleans extends IterableEnvelope<Boolean> {
* @param values Boolean values
*/
public IterableOfBooleans(final boolean... values) {
super(() -> new IterableOf<>(new IteratorOfBooleans(values)));
super(() -> () -> new IteratorOfBooleans(values));
}
}
5 changes: 1 addition & 4 deletions src/main/java/org/cactoos/iterable/IterableOfFloats.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
package org.cactoos.iterable;

import org.cactoos.iterator.IteratorOfFloats;
import org.cactoos.scalar.UncheckedScalar;

/**
* Iterable of float values.
Expand All @@ -38,8 +37,6 @@ public final class IterableOfFloats extends IterableEnvelope<Float> {
* @param values Float values
*/
public IterableOfFloats(final float... values) {
super(() -> ()
-> new UncheckedScalar<>(() -> new IteratorOfFloats(values)).value()
);
super(() -> () -> new IteratorOfFloats(values));
}
}
5 changes: 1 addition & 4 deletions src/main/java/org/cactoos/iterable/IterableOfInts.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
package org.cactoos.iterable;

import org.cactoos.iterator.IteratorOfInts;
import org.cactoos.scalar.UncheckedScalar;

/**
* Iterable of integer values.
Expand All @@ -38,8 +37,6 @@ public final class IterableOfInts extends IterableEnvelope<Integer> {
* @param values Integer values
*/
public IterableOfInts(final int... values) {
super(() -> ()
-> new UncheckedScalar<>(() -> new IteratorOfInts(values)).value()
);
super(() -> () -> new IteratorOfInts(values));
}
}

0 comments on commit 8bf936b

Please sign in to comment.