org.apache.ivy.util.filter

Class FilterHelper

public final class FilterHelper extends Object

Field Summary
static FilterNO_FILTER
Method Summary
static Collectionfilter(Collection col, Filter filter)
Returns a new collection containing only the items from the given collectoin, which are accepted by the filter.
static FiltergetArtifactTypeFilter(String types)
static FiltergetArtifactTypeFilter(String[] types)

Field Detail

NO_FILTER

public static final Filter NO_FILTER

Method Detail

filter

public static Collection filter(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.

getArtifactTypeFilter

public static Filter getArtifactTypeFilter(String types)

getArtifactTypeFilter

public static Filter getArtifactTypeFilter(String[] types)