Package org.apache.ivy.util.filter
Class FilterHelper
- java.lang.Object
-
- org.apache.ivy.util.filter.FilterHelper
-
public final class FilterHelper extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.Collection<T>filter(java.util.Collection<T> col, Filter<T> filter)static Filter<Artifact>getArtifactTypeFilter(java.lang.String types)static Filter<Artifact>getArtifactTypeFilter(java.lang.String[] types)
-
-
-
Method Detail
-
getArtifactTypeFilter
public static Filter<Artifact> getArtifactTypeFilter(java.lang.String[] types)
-
filter
public static <T> java.util.Collection<T> filter(java.util.Collection<T> col, Filter<T> filter)- Type Parameters:
T- The type parameter- Parameters:
col- The collection to filter.filter- The filter to use.- Returns:
- a new collection instance containing the only the the items from the given
collection, which are accepted by the filter.
Comment: We could have used Commons Collections facility for this, if we accepted additional dependencies on third party jars.
-
-