@Immutable protected static final class Paths.SinglePath extends Object implements Path
Modifier | Constructor and Description |
---|---|
protected |
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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected SinglePath(String fieldName)
public String get(int index)
Path
public String getLast()
Path
public String getFirst()
Path
public Path with(String fieldName)
Path
public Path parent()
Path
public int size()
Path
public int compareTo(Path that)
compareTo
in interface Comparable<Path>
public boolean startsWith(Path ancestor)
Path
startsWith
in interface Path
ancestor
- the other path; may not be nullCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.