formatting change
This commit is contained in:
parent
2628fe1eb0
commit
c7bd43e881
|
@ -46,10 +46,10 @@ public class FirstMatchingElementUnitTest {
|
||||||
int lastIndex = userList.size() - 1;
|
int lastIndex = userList.size() - 1;
|
||||||
AtomicInteger counter = new AtomicInteger(-1);
|
AtomicInteger counter = new AtomicInteger(-1);
|
||||||
int predicateIndex = userList.stream()
|
int predicateIndex = userList.stream()
|
||||||
.takeWhile(user -> {
|
.takeWhile(user -> {
|
||||||
counter.getAndIncrement();
|
counter.getAndIncrement();
|
||||||
return !(searchName.equals(user.getUserName()));
|
return !(searchName.equals(user.getUserName()));
|
||||||
})
|
})
|
||||||
.mapToInt(user -> counter.get())
|
.mapToInt(user -> counter.get())
|
||||||
.max()
|
.max()
|
||||||
.orElse(-1);
|
.orElse(-1);
|
||||||
|
|
Loading…
Reference in New Issue