File tree Expand file tree Collapse file tree
src/main/java/nschultz/watcher/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Example implements DirectoryWatchable {
2020 // what file is the event referring to:
2121 System . out. println(changedFile. getAbsolutePath());
2222 // when did it happen:
23- System . out. println(changedFile. whenAsString ());
23+ System . out. println(changedFile. getChangeTime ());
2424 // you could also call the toString method to get all of the information above:
2525 System . out. println(changedFile. toString());
2626 }
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public class ChangedFile {
6060 *
6161 * @return the time of change
6262 */
63- public final Date when () {
63+ public final Date getChangeTime () {
6464 return changeTime ;
6565 }
6666
@@ -70,8 +70,8 @@ public final Date when() {
7070 *
7171 * @return the time when this file was changed
7272 */
73- public final String whenAsString () {
74- return whenAsString ("yyyy-MM-dd HH:mm:ss" );
73+ public final String getChangeTimeFormatted () {
74+ return getChangeTimeFormatted ("yyyy-MM-dd HH:mm:ss" );
7575 }
7676
7777 /**
@@ -80,7 +80,7 @@ public final String whenAsString() {
8080 * @param format the way the time will be formatted before it gets returned
8181 * @return the time when this file was changed
8282 */
83- public final String whenAsString (final String format ) {
83+ public final String getChangeTimeFormatted (final String format ) {
8484 return new SimpleDateFormat (format ).format (changeTime );
8585 }
8686
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public interface DirectoryWatchable {
5050 * the set error stream.
5151 *
5252 * @param ex an instance of the {@code {@link IOException}} that occurred
53- * while trying to watch the director for changes
53+ * while trying to watch the directory for changes
5454 */
5555 default void failed (IOException ex ) {
5656 ex .printStackTrace (System .err );
You can’t perform that action at this time.
0 commit comments