This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push: new b905e55 Better Javadocs and param names. b905e55 is described below commit b905e55d8836db4454f2c1bb5d58c3f31c954642 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Sun Sep 27 11:31:55 2020 -0400 Better Javadocs and param names. --- .../apache/commons/io/filefilter/AgeFileFilter.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java index 2252281..c3ddbab 100644 --- a/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java +++ b/src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java @@ -54,8 +54,8 @@ public class AgeFileFilter extends AbstractFileFilter implements Serializable { /** Whether the files accepted will be older or newer. */ private final boolean acceptOlder; - /** The cutoff time threshold. */ - private final long cutoff; + /** The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970). */ + private final long cutoffMillis; /** * Constructs a new age file filter for files older than (at or before) @@ -108,23 +108,23 @@ public class AgeFileFilter extends AbstractFileFilter implements Serializable { * Constructs a new age file filter for files equal to or older than * a certain cutoff * - * @param cutoff the threshold age of the files + * @param cutoffMillis The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970). */ - public AgeFileFilter(final long cutoff) { - this(cutoff, true); + public AgeFileFilter(final long cutoffMillis) { + this(cutoffMillis, true); } /** * Constructs a new age file filter for files on any one side * of a certain cutoff. * - * @param cutoff the threshold age of the files + * @param cutoffMillis The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970). * @param acceptOlder if true, older files (at or before the cutoff) * are accepted, else newer ones (after the cutoff). */ - public AgeFileFilter(final long cutoff, final boolean acceptOlder) { + public AgeFileFilter(final long cutoffMillis, final boolean acceptOlder) { this.acceptOlder = acceptOlder; - this.cutoff = cutoff; + this.cutoffMillis = cutoffMillis; } /** @@ -142,7 +142,7 @@ public class AgeFileFilter extends AbstractFileFilter implements Serializable { */ @Override public boolean accept(final File file) { - final boolean newer = FileUtils.isFileNewer(file, cutoff); + final boolean newer = FileUtils.isFileNewer(file, cutoffMillis); return acceptOlder != newer; } @@ -154,6 +154,6 @@ public class AgeFileFilter extends AbstractFileFilter implements Serializable { @Override public String toString() { final String condition = acceptOlder ? "<=" : ">"; - return super.toString() + "(" + condition + cutoff + ")"; + return super.toString() + "(" + condition + cutoffMillis + ")"; } }