Class LastModifiedAlgorithm

java.lang.Object
org.apache.tools.ant.types.selectors.modifiedselector.LastModifiedAlgorithm
All Implemented Interfaces:
Algorithm

public class LastModifiedAlgorithm extends Object implements Algorithm
Computes a 'timestamp' of file based on the lastModified time of that file.
Since:
Ant 1.10.6 and 1.9.14
Version:
2018-07-25
  • Constructor Details

    • LastModifiedAlgorithm

      public LastModifiedAlgorithm()
  • Method Details

    • isValid

      public boolean isValid()
      This algorithm doesn't need any configuration. Therefore it's always valid.
      Specified by:
      isValid in interface Algorithm
      Returns:
      always true
    • getValue

      public String getValue(File file)
      Computes a 'timestamp' for a file based on the lastModified time.
      Specified by:
      getValue in interface Algorithm
      Parameters:
      file - The file for which the value should be computed
      Returns:
      the timestamp or null if the timestamp couldn't be computed