added helper method getChildren(String)

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@817495 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-09-22 04:04:54 +00:00
parent dd9f9548d3
commit 3ccd7bb75c
1 changed files with 7 additions and 0 deletions

View File

@ -91,4 +91,11 @@ public class PluginInfo {
public boolean isDefault() {
return Boolean.parseBoolean(attributes.get("default"));
}
public List<PluginInfo> getChildren(String type){
if(children.isEmpty()) return children;
List<PluginInfo> result = new ArrayList<PluginInfo>();
for (PluginInfo child : children) if(type.equals(child.type)) result.add(child);
return result;
}
}