Package ch.grengine.source
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 TypeMethodDescriptionbooleantwo sources are equal if and only if their source IDs are equal.getId()gets the unique ID of this source.longgets the date and time the source was last recognized to have been modified, in milliseconds since 1970.inthashCode()returns the hash code of the source ID.toString()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
two sources are equal if and only if their source IDs are equal. -
hashCode
int hashCode()returns the hash code of the source ID. -
toString
String toString()returns a string suitable for logging.
-