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 java.util.Collection
filter(java.util.Collection col, Filter filter)
Returns a new collection containing only the items from the given collectoin, which are accepted by the filter.static Filter
getArtifactTypeFilter(java.lang.String types)
static Filter
getArtifactTypeFilter(java.lang.String[] types)
-
-
-
Field Detail
-
NO_FILTER
public static final Filter NO_FILTER
-
-
Method Detail
-
getArtifactTypeFilter
public static Filter getArtifactTypeFilter(java.lang.String types)
-
getArtifactTypeFilter
public static Filter getArtifactTypeFilter(java.lang.String[] types)
-
filter
public static java.util.Collection filter(java.util.Collection col, Filter filter)
Returns a new collection containing only the items from the given collectoin, which are accepted by the filter.- Parameters:
col
- The collection to filter.filter
- The filter to use.- Returns:
- A new collection instance containing the only the instance accepted by the filter.
Comment: We could have used Commons-Collections facility for this. If we accepted to add dependencies on third party jars.
-
-