-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(collections): 🎸 data search, translated
Refers: #10
- Loading branch information
1 parent
5a0c6cc
commit 2bc320e
Showing
1 changed file
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,51 @@ | ||
:java-package: src/org/j6toj8/collections | ||
:section-java-package: ../../../{java-package} | ||
|
||
=== Buscar por dados | ||
=== Search for data | ||
|
||
.Objetivo | ||
.Objective | ||
-------------------------------------------------- | ||
Search for data by using methods, such as findFirst(), findAny(), anyMatch(), allMatch(), and noneMatch() | ||
- | ||
Buscar por dados utilizando métodos, como findFirst(), findAny(), anyMatch(), allMatch(), e noneMatch() | ||
-------------------------------------------------- | ||
|
||
. É possÃvel recuperar o primeiro ou um elemento qualquer da coleção. | ||
. You can retrieve the first or any element from the collection. | ||
+ | ||
[source,java,indent=0] | ||
.{java-package}/datasearch/DataSearch_FindFirstAny.java | ||
---- | ||
include::{section-java-package}/datasearch/DataSearch_FindFirstAny.java[tag=code] | ||
---- | ||
+ | ||
.SaÃda no console | ||
.console output | ||
[source,console] | ||
---- | ||
First: 1 | ||
Any: 9 | ||
---- | ||
|
||
. É possÃvel verificar se os elementos da coleção atendem ou não a algum critério. | ||
. You can check whether or not collection elements meet any criteria. | ||
+ | ||
[source,java,indent=0] | ||
.{java-package}/datasearch/DataSearch_Match.java | ||
---- | ||
include::{section-java-package}/datasearch/DataSearch_Match.java[tag=code] | ||
---- | ||
+ | ||
.SaÃda no console | ||
.console output | ||
[source,console] | ||
---- | ||
anyMatch: true | ||
allMatch: false | ||
noneMatch: false | ||
---- | ||
|
||
.References | ||
**** | ||
* Using Streams | ||
+ | ||
Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (p. 185). Wiley. Edição do Kindle. | ||
Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (p. 185). Wiley. Kindle Edition. | ||
* https://www.baeldung.com/java-8-streams[The Java 8 Stream API Tutorial.] | ||
**** | ||
**** |