Class PathSet

java.lang.Object
aQute.libg.glob.PathSet

public class PathSet extends Object
A reusable path set using Ant-style include and exclude globs.
  • Field Details

  • Constructor Details

    • PathSet

      public PathSet()
      Create a path set.
    • PathSet

      public PathSet(String... includes)
      Create a path set with initial Ant-style globs for the include patterns.
      Parameters:
      includes - Add Ant-style globs.
  • Method Details

    • includes

      public PathSet includes(List<String> includes)
      Add Ant-style globs to the include patterns.
      Parameters:
      includes - Add Ant-style globs.
      Returns:
      This PathSet.
    • include

      public PathSet include(String... includes)
      Add Ant-style globs to the include patterns.
      Parameters:
      includes - Add Ant-style globs.
      Returns:
      This PathSet.
    • exclude

      public PathSet exclude(String... excludes)
      Add Ant-style globs to the exclude patterns.
      Parameters:
      excludes - Add Ant-style globs.
      Returns:
      This PathSet.
    • excludes

      public PathSet excludes(List<String> excludes)
      Add Ant-style globs to the exclude patterns.
      Parameters:
      excludes - Add Ant-style globs.
      Returns:
      This PathSet.
    • addPatterns

      private static List<Pattern> addPatterns(Stream<String> globs, List<Pattern> patterns)
    • paths

      public List<String> paths(Collection<String> paths, String... defaultIncludes)
      Return a list of paths in the specified collection matching the configured include and exclude Ant-style glob expressions.
      Parameters:
      defaultIncludes - The default include patterns to use if no include patterns were configured.
      Returns:
      A list of paths in the specified collection which match the include and exclude Ant-style globs.
    • paths

      public List<String> paths(Collection<String> paths, List<String> defaultIncludes)
      Return a list of paths in the specified collection matching the configured include and exclude Ant-style glob expressions.
      Parameters:
      defaultIncludes - The default include patterns to use if no include patterns were configured.
      Returns:
      A list of paths in the specified collection which match the include and exclude Ant-style globs.
    • paths

      public List<String> paths(Collection<String> paths)
      Return a list of paths in the specified collection matching the configured include and exclude Ant-style glob expressions.
      Returns:
      A list of paths in the specified collection which match the include and exclude Ant-style globs.
    • paths

      private static List<String> paths(Collection<String> paths, Predicate<String> matches)
    • matches

      public Predicate<String> matches(String... defaultIncludes)
      Return a predicate matching the configured include and exclude Ant-style glob expressions.
      Parameters:
      defaultIncludes - The default include patterns to use if no include patterns were configured.
      Returns:
      A predicate which matches the include and exclude Ant-style globs.
    • matches

      public Predicate<String> matches(List<String> defaultIncludes)
      Return a predicate matching the configured include and exclude Ant-style glob expressions.
      Parameters:
      defaultIncludes - The default include patterns to use if no include patterns were configured.
      Returns:
      A predicate which matches the include and exclude Ant-style globs.
    • matches

      public Predicate<String> matches()
      Return a predicate matching the configured include and exclude Ant-style glob expressions.
      Returns:
      A predicate which matches the include and exclude Ant-style globs.
    • find

      public Predicate<String> find(String... defaultIncludes)
      Return a predicate finding the configured include and exclude Ant-style glob expressions.
      Parameters:
      defaultIncludes - The default include patterns to use if no include patterns were configured.
      Returns:
      A predicate which finds the include and exclude Ant-style globs.
    • find

      public Predicate<String> find(List<String> defaultIncludes)
      Return a predicate finding the configured include and exclude Ant-style glob expressions.
      Parameters:
      defaultIncludes - The default include patterns to use if no include patterns were configured.
      Returns:
      A predicate which finds the include and exclude Ant-style globs.
    • find

      public Predicate<String> find()
      Return a predicate finding the configured include and exclude Ant-style glob expressions.
      Returns:
      A predicate which find the include and exclude Ant-style globs.
    • matcher

      private Predicate<String> matcher(Predicate<Matcher> predicate, String... defaultIncludes)
    • matcher

      private Predicate<String> matcher(Predicate<Matcher> predicate, List<String> defaultIncludes)
    • matcher

      private Predicate<String> matcher(Predicate<Matcher> predicate)
    • matcher

      private static Predicate<String> matcher(Predicate<Matcher> predicate, List<Pattern> includePatterns, List<Pattern> excludePatterns)
    • toString

      public String toString()
      Overrides:
      toString in class Object