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.
21 lines
489 B
21 lines
489 B
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* 文章分析策略接口
|
|
* 策略模式:定义分析算法的接口,不同的分析算法可以独立变化
|
|
*/
|
|
public interface ArticleAnalyzer {
|
|
/**
|
|
* 分析文章并返回统计结果
|
|
* @param articles 文章列表
|
|
* @return 统计结果映射
|
|
*/
|
|
Map<String, Object> analyze(List<Article> articles);
|
|
|
|
/**
|
|
* 获取分析器名称
|
|
* @return 分析器名称
|
|
*/
|
|
String getName();
|
|
}
|