@Immutable @SerializeWith(value=Paths.Externalizer.class) protected static final class Paths.SinglePath extends Object implements Path
| Modifier | Constructor and Description |
|---|---|
protected |
Paths.SinglePath(String fieldName) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Path that) |
boolean |
equals(Object obj) |
String |
get(int index)
Get a particular segment within this path.
|
String |
getFirst()
Get the first segment in the path.
|
String |
getLast()
Get the last segment in the path.
|
int |
hashCode() |
Iterator<String> |
iterator() |
Path |
parent()
Get the parent path, which may be an empty path.
|
int |
size()
Get the number of segments in this path.
|
boolean |
startsWith(Path ancestor)
Determine if the first segments of this path are equal to the segments in the supplied path.
|
String |
toString() |
Path |
with(String fieldName)
Obtain a path that has this path as the parent and which has as the last segment the supplied field name.
|
protected Paths.SinglePath(String fieldName)
public String get(int index)
Pathpublic String getLast()
Pathpublic String getFirst()
Pathpublic Path with(String fieldName)
Pathpublic Path parent()
Pathpublic int size()
Pathpublic int compareTo(Path that)
compareTo in interface Comparable<Path>public boolean startsWith(Path ancestor)
PathstartsWith in interface Pathancestor - the other path; may not be nullCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.