Interface Source

All Known Subinterfaces:
FileSource, TextSource, UrlSource
All Known Implementing Classes:
BaseSource, DefaultFileSource, DefaultTextSource, DefaultUrlSource

public interface Source
Interface for a (Groovy script) source.
Since:
1.0
Author:
Alain Stalder, Made in Switzerland.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    two sources are equal if and only if their source IDs are equal.
    gets the unique ID of this source.
    long
    gets the date and time the source was last recognized to have been modified, in milliseconds since 1970.
    int
    returns the hash code of the source ID.
    returns a string suitable for logging.
  • Method Details

    • getId

      String getId()
      gets the unique ID of this source.
      Returns:
      ID
      Since:
      1.0
    • getLastModified

      long getLastModified()
      gets the date and time the source was last recognized to have been modified, in milliseconds since 1970.

      You should not rely on this number to increase monotonically or even to represent an actual date and time, but instead consider the source changed each time this method returns a different value.

      Returns:
      last modified
      Since:
      1.0
    • equals

      boolean equals(Object obj)
      two sources are equal if and only if their source IDs are equal.
      Overrides:
      equals in class Object
      Returns:
      whether the two sources are equal
      Since:
      1.0
    • hashCode

      int hashCode()
      returns the hash code of the source ID.
      Overrides:
      hashCode in class Object
      Returns:
      hash code of the source ID
      Since:
      1.0
    • toString

      String toString()
      returns a string suitable for logging.
      Overrides:
      toString in class Object
      Returns:
      a string suitable for logging
      Since:
      1.0