public class UpToDateChecker extends Object
Utility class for detecting if a file is up-to-date.
Constructor and Description |
---|
UpToDateChecker() |
Modifier and Type | Method and Description |
---|---|
void |
addInput(File file)
Add an input file.
|
void |
addInput(long ts)
Add an input timestamp.
|
void |
addOutput(File file)
Add an output file to check.
|
void |
addOutput(long ts)
Add an output timestamp.
|
boolean |
isUpToDate()
Query if the output is up to date.
|
boolean |
isUpToDate(long ts)
Query if a particular output is up to date.
|
public boolean isUpToDate()
Query if the output is up to date.
true
if all outputs are up to date with respect to the inputs.public boolean isUpToDate(long ts)
Query if a particular output is up to date.
ts
- An output timestamp.true
if an output with modification time ts is up to date with respect to the input resources.public void addInput(long ts)
Add an input timestamp.
ts
- The modification time of an input source, in milliseconds since the epoch.public void addInput(File file)
Add an input file.
file
- The input file.public void addOutput(long ts)
Add an output timestamp.
ts
- An output timestamp.public void addOutput(File file)
Add an output file to check.
file
- The file to add to the output files to check.