checkState(currentState instanceof FileState, "currentState is not a FileState but a %s", currentState.getClass());
checkState(previousState instanceof FileState, "previousState is not a FileState but a %s", currentState.getClass());
FileState currentFileState = (FileState) currentState;
FileState previousFileState = (FileState) previousState;
checkState(currentState instanceof FileState, "currentState is not a FileState but a %s", currentState.getClass());
checkState(previousState instanceof FileState, "previousState is not a FileState but a %s", currentState.getClass());
FileState currentFileState = (FileState) currentState;
FileState previousFileState = (FileState) previousState;
- return (currentFileState.exists() != previousFileState.exists()) || (currentFileState.size() != previousFileState.size()) || (currentFileState.modificationTime() != previousFileState.modificationTime());
+ triggered = (currentFileState.exists() != previousFileState.exists()) || (currentFileState.size() != previousFileState.size()) || (currentFileState.modificationTime() != previousFileState.modificationTime());
+ return currentState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean triggers() {
+ return triggered;