public class ConfPath extends InstancePath
Class Representing an KeyPath path.
String representations e.g "/n:rootA/nodeB/listC{key1}/leafD"
User applications usually needs to construct string representations
of paths in this way. To construct a ConfPath
from this
representation use ConfPath(String, Object...)
Constructor and Description |
---|
ConfPath(Cdb cdb,
ConfObject[] kp) |
ConfPath(Cdb cdb,
String fmt,
Object... arguments) |
ConfPath(ConfEBinary o)
Initialize a ConfPath.
|
ConfPath(ConfEList o)
Initialize a ConfPath.
|
ConfPath(ConfObject[] kp)
Initializes a new instance of this class from a given
reverted ConfObject[] keypath where elements
is either
ConfTag or
ConfKey . |
ConfPath(ConfPath confPath) |
ConfPath(Maapi maapi,
int tid,
ConfObject[] kp) |
ConfPath(Maapi maapi,
int tid,
String fmt,
Object... arguments) |
ConfPath(MountIdInterface mountIdCb,
ConfObject[] kp) |
ConfPath(MountIdInterface mountGetter,
List<com.tailf.conf.gen.PathParser.PathElement> pl) |
ConfPath(MountIdInterface mountIdCb,
String fmt,
Object... arguments) |
ConfPath(String fmt,
Object... arguments)
Construct a
ConfPath from a string path representation
and of optional arguments. |
Modifier and Type | Method and Description |
---|---|
ConfPath |
append(String s)
Appends suffix path to existing keypath
|
Object |
clone()
Clones the ConfPath
|
ConfPath |
copyAppend(String s)
CopyAppends to the keypath
|
ConfPath |
copyPop()
Creates a new ConfPath with the current path minus the last
element including list keys.
|
void |
pop()
Pops the last element from the path including list keys.
|
String |
toString()
Default String representation of this path, which is the keypath string
representation
|
String |
toXPathString()
Returns this path as an XPath string
|
atoString, encode, encodeIKP, equals, getCSNode, getKP, getLatestMountId, getMountIdGetter, hashCode, isKey, isParsingDeferred, isRel, setMountIdGetter
public ConfPath(MountIdInterface mountGetter, List<com.tailf.conf.gen.PathParser.PathElement> pl)
public ConfPath(ConfEBinary o) throws ConfException
o
- element constitute a ConfPath
ConfException
public ConfPath(ConfEList o)
o
- element (reversed) constitute a ConfPath
ConfException
public ConfPath(String fmt, Object... arguments) throws ConfException
Construct a ConfPath
from a string path representation
and of optional arguments.
The path is expressed as a format string that could contain fixed text with zero to many embedded format specifiers.
For each specifier one argument in the variable argument list is expected.
format specifiers in the Java API is:%d - requiring an integer parameter (type int) to be substituted.
%s - requiring a java.lang.String parameter to be substituted.
%x - requiring subclasses of type com.tailf.conf.ConfValue to be substituted.
fmt
- path string representationarguments
- optional parameters for substitution in fmtConfException
public ConfPath(Cdb cdb, String fmt, Object... arguments) throws ConfException
ConfException
public ConfPath(Maapi maapi, int tid, String fmt, Object... arguments) throws ConfException
ConfException
public ConfPath(MountIdInterface mountIdCb, String fmt, Object... arguments) throws ConfException
ConfException
public ConfPath(ConfObject[] kp)
ConfTag
or
ConfKey
.kp
- reverted keypathpublic ConfPath(Cdb cdb, ConfObject[] kp)
public ConfPath(Maapi maapi, int tid, ConfObject[] kp) throws ConfException
ConfException
public ConfPath(MountIdInterface mountIdCb, ConfObject[] kp)
public ConfPath(ConfPath confPath)
public String toString()
toString
in class InstancePath
public ConfPath append(String s) throws ConfException
ConfException
public ConfPath copyAppend(String s) throws ConfException
ConfException
public void pop() throws ConfException
ConfException
public ConfPath copyPop() throws ConfException
ConfException
public String toXPathString()
toXPathString
in class InstancePath