Skip to content

Commit b905e55

Browse files
author
Gary Gregory
committed
Better Javadocs and param names.
1 parent f2f1c77 commit b905e55

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/main/java/org/apache/commons/io/filefilter/AgeFileFilter.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public class AgeFileFilter extends AbstractFileFilter implements Serializable {
5454
/** Whether the files accepted will be older or newer. */
5555
private final boolean acceptOlder;
5656

57-
/** The cutoff time threshold. */
58-
private final long cutoff;
57+
/** The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970). */
58+
private final long cutoffMillis;
5959

6060
/**
6161
* Constructs a new age file filter for files older than (at or before)
@@ -108,23 +108,23 @@ public AgeFileFilter(final File cutoffReference, final boolean acceptOlder) {
108108
* Constructs a new age file filter for files equal to or older than
109109
* a certain cutoff
110110
*
111-
* @param cutoff the threshold age of the files
111+
* @param cutoffMillis The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
112112
*/
113-
public AgeFileFilter(final long cutoff) {
114-
this(cutoff, true);
113+
public AgeFileFilter(final long cutoffMillis) {
114+
this(cutoffMillis, true);
115115
}
116116

117117
/**
118118
* Constructs a new age file filter for files on any one side
119119
* of a certain cutoff.
120120
*
121-
* @param cutoff the threshold age of the files
121+
* @param cutoffMillis The cutoff time threshold measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
122122
* @param acceptOlder if true, older files (at or before the cutoff)
123123
* are accepted, else newer ones (after the cutoff).
124124
*/
125-
public AgeFileFilter(final long cutoff, final boolean acceptOlder) {
125+
public AgeFileFilter(final long cutoffMillis, final boolean acceptOlder) {
126126
this.acceptOlder = acceptOlder;
127-
this.cutoff = cutoff;
127+
this.cutoffMillis = cutoffMillis;
128128
}
129129

130130
/**
@@ -142,7 +142,7 @@ public AgeFileFilter(final long cutoff, final boolean acceptOlder) {
142142
*/
143143
@Override
144144
public boolean accept(final File file) {
145-
final boolean newer = FileUtils.isFileNewer(file, cutoff);
145+
final boolean newer = FileUtils.isFileNewer(file, cutoffMillis);
146146
return acceptOlder != newer;
147147
}
148148

@@ -154,6 +154,6 @@ public boolean accept(final File file) {
154154
@Override
155155
public String toString() {
156156
final String condition = acceptOlder ? "<=" : ">";
157-
return super.toString() + "(" + condition + cutoff + ")";
157+
return super.toString() + "(" + condition + cutoffMillis + ")";
158158
}
159159
}

0 commit comments

Comments
 (0)