Add a collection-based alternative to arrays.
Change-Id: I51ebcf5605b165f523cce2909ee3b14bb31729e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* @return effective schema context
*/
public static SchemaContext parseYangResources(final Class<?> clazz, final String... resources) {
- final List<YangTextSchemaSource> sources = new ArrayList<>(resources.length);
+ return parseYangResources(clazz, Arrays.asList(resources));
+ }
+
+ public static SchemaContext parseYangResources(final Class<?> clazz, final Collection<String> resources) {
+ final List<YangTextSchemaSource> sources = new ArrayList<>(resources.size());
for (final String r : resources) {
sources.add(YangTextSchemaSource.forResource(clazz, r));
}