The Collectors of hash based data structures should report UNORDERED. That can let the Stream framework know some optimizations are safe. It would know it doesn't need to take pains to maintain order as the thing it is collecting to doesn't maintain order anyways.
Pretty much only means the hash maps, except for the linked ones.
The Collectors of hash based data structures should report
UNORDERED
. That can let the Stream framework know some optimizations are safe. It would know it doesn't need to take pains to maintain order as the thing it is collecting to doesn't maintain order anyways.Pretty much only means the hash maps, except for the linked ones.