Interface FileChangeAware

All Known Implementing Classes:
BuildFile, BuildFiles, BuildRoot.Changes

public interface FileChangeAware
A type that can detect file modification time changes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the most recent change time, if any.
    static <T extends FileChangeAware>
    Optional<FileTime>
    changedTimeOf(Collection<T> collection)
    Returns the most recent time if there is a change in any element of the collection.
    default boolean
    Returns whether or not this file has a changed time.
  • Method Details

    • hasChanged

      default boolean hasChanged()
      Returns whether or not this file has a changed time.
      Returns:
      true if changed.
    • changedTime

      Optional<FileTime> changedTime()
      Returns the most recent change time, if any.
      Returns:
      The time if changed.
    • changedTimeOf

      static <T extends FileChangeAware> Optional<FileTime> changedTimeOf(Collection<T> collection)
      Returns the most recent time if there is a change in any element of the collection.
      Type Parameters:
      T - The collection type.
      Parameters:
      collection - The collection.
      Returns:
      The time if changed.