Package org.apache.creadur.whisker.scan
Class Directory
java.lang.Object
org.apache.creadur.whisker.scan.Directory
- All Implemented Interfaces:
Comparable<Directory>
Describes a directory.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource
(String name) Registers a contained resource.int
Natural comparison based on name.boolean
Equal if and only if names are equal.Gets the directory contents.getName()
Gets the directory name.int
hashCode()
void
setContents
(Set<String> contents) Sets the directory contents.Sets the directory name.toString()
Suitable for logging.
-
Constructor Details
-
Directory
public Directory()
-
-
Method Details
-
getName
Gets the directory name.- Returns:
- the name
-
setName
Sets the directory name.- Parameters:
name
- the name to set- Returns:
- this, not null
-
getContents
Gets the directory contents.- Returns:
- the contents
-
setContents
Sets the directory contents.- Parameters:
contents
- the contents to set
-
hashCode
public int hashCode() -
equals
Equal if and only if names are equal. -
toString
Suitable for logging. -
addResource
Registers a contained resource.- Parameters:
name
- not null
-
compareTo
Natural comparison based on name.- Specified by:
compareTo
in interfaceComparable<Directory>
- Parameters:
other
- another directory- Returns:
- comparison
- See Also:
-