Example #1
0
 public Double getTotalSum() {
   double sum = 0.0;
   for (ArticleData data : articles) {
     sum += Double.valueOf(data.getPrice());
   }
   return sum;
 }
Example #2
0
 public boolean removeArticleWithId(String id) {
   logger.info("Remove article by id: " + id);
   for (ArticleData article : articles) {
     if (article.getId().equals(id)) {
       return remove(article);
     }
   }
   return Boolean.FALSE;
 }
Example #3
0
 public boolean remove(ArticleData article) {
   logger.info("Remove article: " + article.toString());
   return articles.remove(article);
 }
Example #4
0
 public void addArticleData(ArticleData article) {
   logger.info("Added article: " + article.toString());
   articles.add(article);
 }