+ Added command functionality base and modified command stub

This commit is contained in:
Matthew Cech
2019-05-05 15:22:49 -07:00
parent 854da8d8cd
commit 645e632dcb
9 changed files with 218 additions and 16 deletions
-37
View File
@@ -1,37 +0,0 @@
package dataStructures;
import java.nio.file.Path;
public class MonitoredFile implements Comparable<Object>
{
public final Path path;
public final Long lastModified;
public MonitoredFile(Path path, Long lastModified)
{
this.path = path;
this.lastModified = lastModified;
}
// Override equals operator - used for .contains(...) on list items
@Override
public boolean equals(Object other)
{
if(this.compareTo(other) == 0)
return true;
return false;
}
@Override
// Comparison
public int compareTo(Object other)
{
int strCmp = path.getFileName().toString().compareTo(((MonitoredFile)other).path.getFileName().toString());
if(strCmp == 0)
return lastModified.compareTo(((MonitoredFile)other).lastModified);
return strCmp;
}
}