Class FilterHelper


  • public final class FilterHelper
    extends java.lang.Object
    • Method Detail

      • getArtifactTypeFilter

        public static Filter<Artifact> getArtifactTypeFilter​(java.lang.String types)
      • 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.