collection for Generic trpes
How can I represent the generic types in a single collection ?
public interface Rule<T> {
String execute(T dataProvider)
}
public interface DataProvider {
}
public class RulesExecutor() {
public RulesExecutor(Map<String, List<Rule>> documentToRuleListMap) {
}
public executeRules(DataProvider dataProvider) {
// some logic here
};
}
Is it possible to store a map as shown in RulesExecutor sconstructor ? If
not, what is the right data structure to store this info ?
No comments:
Post a Comment