diff options
author | Robin Stocker <robin@nibor.org> | 2013-07-15 17:20:53 +0200 |
---|---|---|
committer | Chris Aniszczyk <caniszczyk@gmail.com> | 2013-07-21 21:47:00 -0500 |
commit | 7033179440fe81f973bd1fdf076b020b276ea782 (patch) | |
tree | 0d18511b51883629ce34d8a73ad2b5d07b22aad9 | |
parent | 06dd0e9e27a342f74ec97648ab1fbf101af383a4 (diff) | |
download | jgit-7033179440fe81f973bd1fdf076b020b276ea782.tar.gz jgit-7033179440fe81f973bd1fdf076b020b276ea782.zip |
Improve documentation of PathSuffixFilter
Change-Id: I1077dbb1f10c7cc687c0d1b8a8e8f763ca96977c
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java index 2c1f20d626..f54cbeae21 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java @@ -52,17 +52,25 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.treewalk.TreeWalk; /** - * Includes tree entries only if they match the configured path. + * Includes tree entries only if they end with the configured path (suffix + * match). + * <p> + * For example, <code>PathSuffixFilter.create(".txt")</code> will match all + * paths ending in <code>.txt</code>. + * <p> + * Using this filter is recommended instead of filtering the entries using + * {@link TreeWalk#getPathString()} and <code>endsWith</code> or some other type + * of string match function. */ public class PathSuffixFilter extends TreeFilter { /** - * Create a new tree filter for a user supplied path. + * Create a new tree filter for a user supplied path suffix. * <p> * Path strings use '/' to delimit directories on all platforms. * * @param path - * the path (suffix) to filter on. Must not be the empty string. + * the path suffix to filter on. Must not be the empty string. * @return a new filter for the requested path. * @throws IllegalArgumentException * the path supplied was the empty string. |