예제 #1
0
 public Double getTotalSum() {
   double sum = 0.0;
   for (ArticleData data : articles) {
     sum += Double.valueOf(data.getPrice());
   }
   return sum;
 }
예제 #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;
 }
예제 #3
0
 public boolean remove(ArticleData article) {
   logger.info("Remove article: " + article.toString());
   return articles.remove(article);
 }
예제 #4
0
 public void addArticleData(ArticleData article) {
   logger.info("Added article: " + article.toString());
   articles.add(article);
 }