Finally, we indicate that our collector is IDENTITY_FINISH and CONCURRENT:
@Override
public Set<Characteristics> characteristics() {
return Set.of(IDENTITY_FINISH, CONCURRENT);
}
The code that's bundled with this book glues all the pieces of the puzzle together in a class named MelonCollector.