org.kie.commons.java.nio.file.StandardWatchEventKind Maven / Gradle / Ivy
The newest version!
package org.kie.commons.java.nio.file;
import org.kie.commons.data.Pair;
public final class StandardWatchEventKind {
private StandardWatchEventKind() {
}
public static final WatchEvent.Kind ENTRY_CREATE = new StdWatchEventKind( "ENTRY_CREATE", Path.class );
public static final WatchEvent.Kind ENTRY_DELETE = new StdWatchEventKind( "ENTRY_DELETE", Path.class );
public static final WatchEvent.Kind ENTRY_MODIFY = new StdWatchEventKind( "ENTRY_MODIFY", Path.class );
public static final WatchEvent.Kind ENTRY_RENAME = new StdWatchEventKind( "ENTRY_RENAME", Pair.class );
private static class StdWatchEventKind implements WatchEvent.Kind {
private final String name;
private final Class type;
StdWatchEventKind( String name,
Class type ) {
this.name = name;
this.type = type;
}
@Override
public String name() {
return name;
}
@Override
public Class type() {
return type;
}
@Override
public String toString() {
return name;
}
}
}