Skip to content

Commit ec6d76f

Browse files
committed
refactor(streams): 💡 using streams classes
1 parent 12bef0c commit ec6d76f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/org/j6toj8/streams/usingstreams/Streams_Match.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public class Streams_Match {
77
public static void main(String[] args) {
88
// tag::code[]
99
boolean anyMatch = Stream.of(7, 2, 1, 8, 4, 9, 2, 8) // stream de vários Integer
10-
.anyMatch(e -> e > 5); // vefifica se algum elemento é maior que 5
10+
.anyMatch(e -> e > 5); // verifica se algum elemento é maior que 5
1111
System.out.println("anyMatch: " + anyMatch);
1212

1313
boolean allMatch = Stream.of(7, 2, 1, 8, 4, 9, 2, 8) // stream de vários Integer
14-
.allMatch(e -> e > 5); // vefifica se TODOS os elementos são maiores que 5
14+
.allMatch(e -> e > 5); // verifica se TODOS os elementos são maiores que 5
1515
System.out.println("allMatch: " + allMatch);
1616

1717
boolean noneMatch = Stream.of(7, 2, 1, 8, 4, 9, 2, 8) // stream de vários Integer
18-
.noneMatch(e -> e > 5); // vefifica NENHUM elemento é maior que 5
18+
.noneMatch(e -> e > 5); // verifica se NENHUM elemento é maior que 5
1919
System.out.println("noneMatch: " + noneMatch);
2020

2121
// end::code[]

src/org/j6toj8/streams/usingstreams/primitives/Streams_Primitives.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void main(String[] args) {
1818

1919
System.out.println("\n LongStream");
2020
LongStream.of(1, 2, 3).forEach(System.out::print);
21-
System.out.println("");
21+
System.out.println();
2222
LongStream.range(1, 4).forEach(System.out::print);
2323
// end::code[]
2424
}

0 commit comments

Comments
 (0)