public static TreeFilter create(Collection<TreeFilter> list) {if (list.size() < 2)throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded);final TreeFilter[] subfilters = new TreeFilter[list.size()];list.toArray(subfilters);if (subfilters.length == 2)return create(subfilters[0], subfilters[1]);return new List(subfilters);}

public static TreeFilter Create(ICollection<TreeFilter> list){if (list.Count < 2){throw new ArgumentException(JGitText.Get().atLeastTwoFiltersNeeded);}TreeFilter[] subfilters = new TreeFilter[list.Count];Sharpen.Collections.ToArray(list, subfilters);if (subfilters.Length == 2){return Create(subfilters[0], subfilters[1]);}return new OrTreeFilter.List(subfilters);}
