Code example for ConcurrentLinkedQueue

Methods: clear

0
    private ConcurrentLinkedQueue<MouseEvent> mouseReleased = new ConcurrentLinkedQueue<MouseEvent>(); 
 
    public List<MouseEvent> unbufferMouseReleased() 
    { 
        List<MouseEvent> result = new ArrayList<MouseEvent>(mouseReleased); 
        mouseReleased.clear(); 
        return result; 
    } 
 
    @Override 
    public void mouseClicked(MouseEvent e) 
    { 
        // TODO Auto-generated method stub 
 
    } 
 
    @Override 
    public void mousePressed(MouseEvent e) 
    { 
        // TODO Auto-generated method stub