src/share/classes/java/nio/file/WatchEvent.java
Print this page
*** 42,52 ****
* @param <T> The type of the context object associated with the event
*
* @since 1.7
*/
! public abstract class WatchEvent<T> {
/**
* An event kind, for the purposes of identification.
*
* @since 1.7
--- 42,52 ----
* @param <T> The type of the context object associated with the event
*
* @since 1.7
*/
! public interface WatchEvent<T> {
/**
* An event kind, for the purposes of identification.
*
* @since 1.7
*** 63,77 ****
*/
Class<T> type();
}
/**
- * Initializes a new instance of this class.
- */
- protected WatchEvent() { }
-
- /**
* An event modifier that qualifies how a {@link Watchable} is registered
* with a {@link WatchService}.
*
* <p> This release does not define any <em>standard</em> modifiers.
*
--- 63,72 ----
*** 88,106 ****
/**
* Returns the event kind.
*
* @return the event kind
*/
! public abstract Kind<T> kind();
/**
* Returns the event count. If the event count is greater than {@code 1}
* then this is a repeated event.
*
* @return the event count
*/
! public abstract int count();
/**
* Returns the context for the event.
*
* <p> In the case of {@link StandardWatchEventKind#ENTRY_CREATE ENTRY_CREATE},
--- 83,101 ----
/**
* Returns the event kind.
*
* @return the event kind
*/
! Kind<T> kind();
/**
* Returns the event count. If the event count is greater than {@code 1}
* then this is a repeated event.
*
* @return the event count
*/
! int count();
/**
* Returns the context for the event.
*
* <p> In the case of {@link StandardWatchEventKind#ENTRY_CREATE ENTRY_CREATE},
*** 110,116 ****
* the directory registered with the watch service, and the entry that is
* created, deleted, or modified.
*
* @return the event context; may be {@code null}
*/
! public abstract T context();
}
--- 105,111 ----
* the directory registered with the watch service, and the entry that is
* created, deleted, or modified.
*
* @return the event context; may be {@code null}
*/
! T context();
}