class FeatureBuilder {

	public static List<ScenarioDefinition> FindScenarios(String prefix, String feature,
			List<Feature> features) {
		List<ScenarioDefinition> result = new ArrayList<ScenarioDefinition>();
		for (Feature f : features) {
			if (f.getName().equalsIgnoreCase(feature)) {
				for (Iterator<Node> iterator = f.children().iterator(); iterator.hasNext();) {
					Node n = iterator.next();
					 if (n instanceof ScenarioDefinition) {
						 if (((ScenarioDefinition)n).getName().startsWith(prefix)) {
							result.add(((ScenarioDefinition)n));
						}
					 }
				}
			}
		}
		return result;
	}

}