public class NodePath extends Object
encode the names,
so they can be stored in ZooKeeper.| Modifier and Type | Field and Description |
|---|---|
static char |
SEPARATOR |
| Modifier | Constructor and Description |
|---|---|
protected |
NodePath(NodePath parentPath,
String childPathSegment) |
protected |
NodePath(NodePath parentPath,
String childPathSegment,
boolean encoded) |
|
NodePath(String... pathSegments)
Create an
NodePath that consists of the given path segments. |
| Modifier and Type | Method and Description |
|---|---|
NodePath |
child(String childNodeName)
Create a
NodePath, which is a child of this one. |
protected NodePath |
child(String childNodeName,
boolean encoded)
Create a
NodePath, which is a child of this one. |
static String |
decode(String encoded)
Decode the given
String. |
static String |
encode(String raw)
Encode the given
String. |
boolean |
equals(Object obj) |
String |
getNodeName() |
int |
hashCode() |
String |
toString()
Encoded
String representation of this NodePath. |
public static final char SEPARATOR
public NodePath(String... pathSegments)
NodePath that consists of the given path segments.pathSegments - the sequence of path segments the NodePath consists of, must not be null or emptypublic NodePath child(String childNodeName)
NodePath, which is a child of this one.childNodeName - name of the child node, must not be nullprotected NodePath child(String childNodeName, boolean encoded)
NodePath, which is a child of this one.childNodeName - name of the child node, must not be nullpublic String getNodeName()
public String toString()
String representation of this NodePath.public static String encode(String raw)
String. All occurrences of "/" are mapped to "%2A" and all occurrences of
"%" to "%2F".raw - the String to encode, must not be nulldecode(String)public static String decode(String encoded)
String. It is the inverse operation of encode(String). For all
Strings s, decode(encode(s)).equals(s) should be
true.encoded - the String to decode, must not be nullencode(String)Copyright © 2011–2018 Talend Inc.. All rights reserved.