You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
483 B

import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ArticleCountAnalyzer implements ArticleAnalyzer {
@Override
public Map<String, Object> analyze(List<Article> articles) {
Map<String, Object> result = new HashMap<>();
result.put("analyzer", getName());
result.put("totalCount", articles.size());
return result;
}
@Override
public String getName() {
return "文章数量分析器";
}
}