X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjshopcore%2Fmodel%2Fbasket%2FBaseBasket.java;h=3e7f2781b8c9f93383fcbd35812cc76b47d094bf;hb=e7033016cdc804552134aa7b50519f3070649ffc;hp=4d8e7c4480073f3463e808a0f1dd9ab2c9e8b053;hpb=e8f0175feb8e5dd1d5ba09054400f6df6b2f2804;p=jshop-core.git diff --git a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java index 4d8e7c4..3e7f278 100644 --- a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java +++ b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Roland Haeder + * Copyright (C) 2016 Roland Häder * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,8 +24,8 @@ import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException; /** * A general basket class. This class does not store any properties, it only * contains logic for handling the items (T). - * - * @author Roland Haeder + *

+ * @author Roland Häder * @param Any instance that implements AddableBasketItem */ public abstract class BaseBasket implements Basket { @@ -96,15 +96,6 @@ public abstract class BaseBasket implements Basket< return this.deque.getLast(); } - @Override - public int getLastNumRows () { - // Is the list empty? - assert this.isEmpty() : "deque is empty"; //NOI18N - - // It is size-1 - return (this.deque.size() - 1); - } - @Override public boolean isAdded (final T item) { // item must not be null @@ -137,4 +128,14 @@ public abstract class BaseBasket implements Basket< // Deligate call to frontend return this.deque.isEmpty(); } + + @Override + public int size () { + // Is the list empty? + assert this.isEmpty() : "deque is empty"; //NOI18N + + // It is size-1 + return this.deque.size(); + } + }