AtomicReference<Integer>totalRd=newAtomicReference<>(0);
AtomicReference<Integer>totalRa=newAtomicReference<>(0);
AtomicReference<Integer>totalAst=newAtomicReference<>(0);
AtomicIntegerindex=newAtomicInteger(0);
gpsList.stream().forEach(gps-> {
index.getAndIncrement();
AtomicIntegerindex2=newAtomicInteger(0);
traceLists.stream().anyMatch(trace-> {
index2.getAndIncrement();
if (index.get() ==index2.get()){
trace.setASharpTurn(gps.getASharpTurn());
trace.setRapidDeceleration(gps.getRapidDeceleration());
trace.setRapidAcceleration(gps.getRapidAcceleration());
totalRd.updateAndGet(v->v+gps.getRapidDeceleration());
totalRa.updateAndGet(v->v+gps.getRapidAcceleration());
totalAst.updateAndGet(v->v+gps.getASharpTurn());
}
returnfalse;
});
});