Code example for Deque

Methods: size

    public Shirt takeShirt() { 
        return shirts.pop();
    public int getShirtCount() { 
        return shirts.size();
    public boolean authorizeCreditCard(String accountNumber, double amount) {
        //placeholder method to test workflow 
        //since this would normally communicate with a external source 
        //this method should take longer to execute... 
        //TODO add delaying code here 
        return true; 
Contextual code suggestions in your IDE  Get Codota for Java