Sets and Queues
Sets and queues: collections that decide what counts as a duplicate and what comes out next, and which class to use.
Sets and queues, two kinds of collection that make a decision for you. A set decides what counts as a duplicate; a queue decides which element comes out next. Both decisions come from methods on your own classes or from an order you supply, which is why they belong together. It covers HashSet and its add result, the three set classes, ArrayDeque and PriorityQueue, why a priority queue prints out of order, and why Stack should not be used. It leaves out concurrent queues.
Contents
8 cardsnot started