Updating map method
This commit is contained in:
parent
c7bd43e881
commit
ab70c92934
|
@ -25,7 +25,7 @@ public class FirstMatchingElementUnitTest {
|
||||||
counter.getAndIncrement();
|
counter.getAndIncrement();
|
||||||
return searchName.equals(user.getUserName());
|
return searchName.equals(user.getUserName());
|
||||||
})
|
})
|
||||||
.map(user -> counter.get())
|
.mapToInt(user -> counter.get())
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(-1);
|
.orElse(-1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue