/*
- * 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
/**
* A general basket class. This class does not store any properties, it only
* contains logic for handling the items (T).
- *
- * @author Roland Haeder<roland@mxchange.org>
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
* @param <T> Any instance that implements AddableBasketItem
*/
public abstract class BaseBasket<T extends AddableBasketItem> implements Basket<T> {
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
// 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();
+ }
+
}