Class ResourceDescription
java.lang.Object
org.apache.creadur.whisker.app.analysis.ResourceDescription
- All Implemented Interfaces:
Comparable<ResourceDescription>
Describes a resource in a software distribution.
-
Constructor Summary
ConstructorDescriptionResourceDescription
(String directoryName, String resourceName) Constructs a description of the given resource. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ResourceDescription other) Natural comparison is directory name, then resource name.boolean
Equal means identical name and directory.final String
Gets the name of the containing directory.final String
Gets the resource name.int
hashCode()
Hash code compatible with equals.toString()
Suitable for logging.
-
Constructor Details
-
ResourceDescription
Constructs a description of the given resource.- Parameters:
directoryName
- not nullresourceName
- not null
-
-
Method Details
-
getDirectory
Gets the name of the containing directory.- Returns:
- the directoryName, not null
-
getResource
Gets the resource name.- Returns:
- the resourceName, not null
-
hashCode
public int hashCode()Hash code compatible with equals. -
equals
Equal means identical name and directory. -
toString
Suitable for logging. -
compareTo
Natural comparison is directory name, then resource name.- Specified by:
compareTo
in interfaceComparable<ResourceDescription>
- Parameters:
other
- possibly null- Returns:
- numeric comparison
- See Also:
-