-
- Type Parameters:
T
- type of target
- Enclosing interface:
- ChangeWatcher<T>
public static interface ChangeWatcher.ChangeEvent<T>
A change event, carrying the target, type of change and time of change.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Instant
changeTime()
Time of change, or as close to that time as we can get.static <T> ChangeWatcher.ChangeEvent<T>
create(T target, ChangeEventType type)
static <T> ChangeWatcher.ChangeEvent<T>
create(T target, ChangeEventType type, Instant instant)
T
target()
Target of the change.ChangeEventType
type()
Type of change if available.
-
-
-
Method Detail
-
changeTime
Instant changeTime()
Time of change, or as close to that time as we can get.- Returns:
- instant of the change
-
target
T target()
Target of the change. This may be the same as the target ofChangeWatcher
, though this may also be a different target. In case ofPath
, the change watcher may watch a directory, yet the change event notifies about a single file within that directory.- Returns:
- target that is changed
-
type
ChangeEventType type()
Type of change if available. If no details can be found (e.g. we do not know if the target was deleted, created or modified, useChangeEventType.CHANGED
.- Returns:
- type of change
-
create
static <T> ChangeWatcher.ChangeEvent<T> create(T target, ChangeEventType type, Instant instant)
-
create
static <T> ChangeWatcher.ChangeEvent<T> create(T target, ChangeEventType type)
-
-