public final class JFPRepositoryPath extends Object implements Serializable, Comparable<JFPRepositoryPath>
Constructor and Description |
---|
JFPRepositoryPath(String in_actual)
Construct a name, raising
JFPExceptionInvalidArgument if the name
is not valid according to validPath(String) . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JFPRepositoryPath o) |
boolean |
equals(Object obj) |
List<String> |
getComponents() |
int |
hashCode() |
static String |
normalizePath(String path)
Normalize a path - remove trailing slashes and convert sequences to
slashes to a single slash.
|
String |
toString() |
static boolean |
validPath(String path)
Check path validity.
|
static boolean |
validPathComponent(String name)
Check path component validity.
|
public JFPRepositoryPath(String in_actual) throws JFPExceptionInvalidArgument
JFPExceptionInvalidArgument
if the name
is not valid according to validPath(String)
.in_actual
- The actual name.JFPExceptionInvalidArgument
- If the path is not valid.public static String normalizePath(String path)
path
- The path.public static boolean validPath(String path)
path
- The name.true
iff all of the following conditions hold:
validPathComponent(String)
public static boolean validPathComponent(String name)
name
- The nametrue
iff all of the following conditions hold:
[[.-_][A-Z][a-z][0-9]]+
public int compareTo(@Nullable JFPRepositoryPath o)
compareTo
in interface Comparable<JFPRepositoryPath>
Copyright © 2015 <code@io7m.com> http://io7m.com