public class BasicPath extends java.lang.Object implements ArchivePath, java.lang.Comparable<ArchivePath>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
context
The context which this path represents; immutable so we're thread-safe.
|
private static java.util.logging.Logger |
log
Logger
|
SEPARATOR, SEPARATOR_STRING
Constructor and Description |
---|
BasicPath()
Creates a new Path representing the root context
|
BasicPath(ArchivePath basePath,
ArchivePath context)
Creates a new Path using the specified base and specified relative context.
|
BasicPath(ArchivePath basePath,
java.lang.String context)
Creates a new Path using the specified base and specified relative context.
|
BasicPath(java.lang.String context)
Creates a new Path with the specified context
|
BasicPath(java.lang.String basePath,
ArchivePath context)
Creates a new Path using the specified base and specified relative context.
|
BasicPath(java.lang.String basePath,
java.lang.String context)
Creates a new Path using the specified base and specified relative context.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ArchivePath path) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
get()
Obtains the context which this
ArchivePath represents |
ArchivePath |
getParent()
Obtains the parent of this Path, if exists, else null.
|
int |
hashCode() |
java.lang.String |
toString() |
private static final java.util.logging.Logger log
private final java.lang.String context
public BasicPath()
public BasicPath(java.lang.String context)
context
- The context which this path represents. Null or blank represents the root. Relative paths will be
adjusted to absolute form.public BasicPath(ArchivePath basePath, ArchivePath context)
basePath
- context
- public BasicPath(ArchivePath basePath, java.lang.String context)
basePath
- context
- public BasicPath(java.lang.String basePath, ArchivePath context)
basePath
- context
- public BasicPath(java.lang.String basePath, java.lang.String context)
basePath
- context
- public java.lang.String get()
ArchivePath
representsget
in interface ArchivePath
ArchivePath.get()
public ArchivePath getParent()
getParent
in interface ArchivePath
ArchivePath.getParent()
public int compareTo(ArchivePath path)
compareTo
in interface java.lang.Comparable<ArchivePath>
Comparable.compareTo(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()