public class Directory extends Object implements Comparable<Directory>
Constructor and Description |
---|
Directory() |
Modifier and Type | Method and Description |
---|---|
void |
addResource(String name)
Registers a contained resource.
|
int |
compareTo(Directory other)
Natural comparison based on name.
|
boolean |
equals(Object obj)
Equal if and only if names are equal.
|
Set<String> |
getContents()
Gets the directory contents.
|
String |
getName()
Gets the directory name.
|
int |
hashCode() |
void |
setContents(Set<String> contents)
Sets the directory contents.
|
Directory |
setName(String name)
Sets the directory name.
|
String |
toString()
Suitable for logging.
|
public String getName()
public Directory setName(String name)
name
- the name to setpublic void setContents(Set<String> contents)
contents
- the contents to setpublic int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
obj
- possibly nullObject.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public void addResource(String name)
name
- not nullpublic int compareTo(Directory other)
compareTo
in interface Comparable<Directory>
other
- another directoryComparable.compareTo(java.lang.Object)
Copyright © 2011–1970 Apache Software Foundation. All rights reserved.