Package org.savantbuild.io
Class Directory
java.lang.Object
org.savantbuild.io.Directory
- All Implemented Interfaces:
Comparable<Directory>
A directory that might be empty or might contain other directories or files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringattributesValid(Map<String, Object> attributes) Determines if the attributes given can be used to construct a Directory.intbooleanstatic DirectoryfromAttributes(Map<String, Object> attributes) Constructs a Directory from a Map of attributes.inthashCode()toString()withGroupName(String groupName) Sets the groupName.withLastModifiedTime(FileTime lastModifiedTime) Sets the lastModifiedTime.Sets the mode.Sets the name.withUserName(String userName) Sets the userName.
-
Field Details
-
REQUIRED_ATTRIBUTES
-
VALID_ATTRIBUTES
-
groupName
-
lastModifiedTime
-
mode
-
name
-
userName
-
-
Constructor Details
-
Directory
-
Directory
-
-
Method Details
-
attributesValid
Determines if the attributes given can be used to construct a Directory.- Parameters:
attributes- The attributes.- Returns:
- Null if the attributes are valid, an error message describing why they aren't valid.
-
fromAttributes
Constructs a Directory from a Map of attributes.- Parameters:
attributes- The attributes.- Returns:
- The Directory.
-
compareTo
- Specified by:
compareToin interfaceComparable<Directory>
-
equals
-
hashCode
public int hashCode() -
toString
-
withGroupName
Sets the groupName.- Parameters:
groupName- The groupName- Returns:
- This.
-
withLastModifiedTime
Sets the lastModifiedTime.- Parameters:
lastModifiedTime- The lastModifiedTime- Returns:
- This.
-
withMode
Sets the mode.- Parameters:
mode- The mode- Returns:
- This.
-
withName
Sets the name.- Parameters:
name- The name.- Returns:
- This.
-
withUserName
Sets the userName.- Parameters:
userName- The userName- Returns:
- This.
-