public class ResourcePath extends Object implements Iterable<String>, Comparable<ResourcePath>
ResourceStorageDao
implementation.Constructor and Description |
---|
ResourcePath(Iterable<String> pathElements) |
ResourcePath(ResourcePath parent,
Iterable<String> path) |
ResourcePath(ResourcePath parent,
String... path) |
ResourcePath(String... path) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ResourcePath other) |
String[] |
elements() |
boolean |
equals(Object obj) |
static ResourcePath |
fromString(String s) |
static ResourcePath |
get(Iterable<String> pathElements)
Convenience method.
|
static ResourcePath |
get(ResourcePath parent,
Iterable<String> path)
Convenience method.
|
static ResourcePath |
get(ResourcePath parent,
String... path)
Convenience method.
|
static ResourcePath |
get(String... path)
Convenience method.
|
String |
getName() |
ResourcePath |
getParent() |
int |
hashCode() |
boolean |
hasParent() |
Iterator<String> |
iterator() |
int |
relativeDepth(ResourcePath child)
Determines the relative depth of a child path.
|
static Path |
resourceToFilesystemPath(ResourcePath path)
Converts the given resource path to a relative path on filesystem.
|
static String |
sanitize(String path) |
String |
toString() |
static String |
toString(ResourcePath path) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ResourcePath(String... path)
public ResourcePath(ResourcePath parent, String... path)
public ResourcePath(ResourcePath parent, Iterable<String> path)
public static ResourcePath get(String... path)
public static ResourcePath get(Iterable<String> pathElements)
public static ResourcePath get(ResourcePath parent, String... path)
public static ResourcePath get(ResourcePath parent, Iterable<String> path)
public String getName()
public String[] elements()
public int relativeDepth(ResourcePath child)
public ResourcePath getParent()
public boolean hasParent()
public int compareTo(ResourcePath other)
compareTo
in interface Comparable<ResourcePath>
public static Path resourceToFilesystemPath(ResourcePath path)
path
- the resource path to resolvepublic static ResourcePath fromString(String s)
public static String toString(ResourcePath path)
Copyright © 2021. All rights reserved.