Code example for TreeSet

Methods: clear

0
 
    /** 
    * Lets the manager know that the unprinted items have been printed, clear that queue. 
    */ 
    private void clearUnprintedItems() { 
        _unprintedItems.clear();
    } 
     
    public void printUnprintedItems() { 
        BarcodePrinter printer = new BarcodePrinter();
        try { 
            printer.printBarcodes(getUnprintedItems());
            clearUnprintedItems(); 
        } 
        catch(IOException e) {
            System.out.println(e);
        } 
        catch(DocumentException e) {
            System.out.println(e);
        } 
    }