Convenience methods on HasFeature

This commit is contained in:
Spencer Gibb
2015-09-25 14:43:15 -06:00
parent 93455532f9
commit be1c4ae881

View File

@@ -26,4 +26,12 @@ public class HasFeatures {
public static HasFeatures namedFeatures(NamedFeature... namedFeatures) {
return new HasFeatures(Collections.<Class>emptyList(), Arrays.asList(namedFeatures));
}
public static HasFeatures namedFeature(String name, Class<?> type) {
return namedFeatures(new NamedFeature(name, type));
}
public static HasFeatures namedFeatures(String name1, Class<?> type1, String name2, Class<?> type2) {
return namedFeatures(new NamedFeature(name1, type1), new NamedFeature(name2, type2));
}
}