From: Roland Haeder Date: Sun, 10 Apr 2016 13:15:22 +0000 (+0200) Subject: renamed method as it now returns only size() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9653084311289ac311117c75b0e39e5adf42aa22;p=jproduct-core.git renamed method as it now returns only size() --- diff --git a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java index 476c529..b6a3b8a 100644 --- a/src/org/mxchange/jshopcore/model/basket/BaseBasket.java +++ b/src/org/mxchange/jshopcore/model/basket/BaseBasket.java @@ -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 @@ -138,4 +129,13 @@ public abstract class BaseBasket implements Basket< 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(); + } + } diff --git a/src/org/mxchange/jshopcore/model/basket/Basket.java b/src/org/mxchange/jshopcore/model/basket/Basket.java index c963ba2..075006b 100644 --- a/src/org/mxchange/jshopcore/model/basket/Basket.java +++ b/src/org/mxchange/jshopcore/model/basket/Basket.java @@ -65,11 +65,11 @@ public interface Basket extends Serializable { T getLast (); /** - * Getter for last num rows + * Getter for basket size *

- * @return Last num rows + * @return Basket size */ - int getLastNumRows (); + int size (); /** * Checks whether the given item has already been added by checking the