protected NodePath(NodePath parentPath, String childPathSegment) { checkValidPathSegment(childPathSegment); path = parentPath.path + SEPARATOR + encode(childPathSegment); }
protected NodePath(NodePath parentPath, String childPathSegment, boolean encoded) { checkValidPathSegment(childPathSegment); String encodedChildPathSegment = encoded ? childPathSegment : encode(childPathSegment); path = parentPath.path + SEPARATOR + encodedChildPathSegment; }
protected NodePath(NodePath parentPath, String childPathSegment, boolean encoded) { checkValidPathSegment(childPathSegment); String encodedChildPathSegment = encoded ? childPathSegment : encode(childPathSegment); path = parentPath.path + SEPARATOR + encodedChildPathSegment; }
protected NodePath(NodePath parentPath, String childPathSegment) { checkValidPathSegment(childPathSegment); path = parentPath.path + SEPARATOR + encode(childPathSegment); }
/** * Create an <code>NodePath</code> that consists of the given path segments. * * @param pathSegments * the sequence of path segments the NodePath consists of, must not be null or empty */ public NodePath(String... pathSegments) { if (pathSegments == null || pathSegments.length == 0) { LOG.log(Level.SEVERE, "At least one path segment must be defined."); throw new IllegalArgumentException("At least one path segment must be defined."); } StringBuffer rawPath = new StringBuffer(); for (String pathSegment : pathSegments) { checkValidPathSegment(pathSegment); String encodedPathSegment = encode(pathSegment); rawPath.append(SEPARATOR).append(encodedPathSegment); } path = rawPath.toString(); }
/** * Create an <code>NodePath</code> that consists of the given path segments. * * @param pathSegments * the sequence of path segments the NodePath consists of, must not be null or empty */ public NodePath(String... pathSegments) { if (pathSegments == null || pathSegments.length == 0) { LOG.log(Level.SEVERE, "At least one path segment must be defined."); throw new IllegalArgumentException("At least one path segment must be defined."); } StringBuffer rawPath = new StringBuffer(); for (String pathSegment : pathSegments) { checkValidPathSegment(pathSegment); String encodedPathSegment = encode(pathSegment); rawPath.append(SEPARATOR).append(encodedPathSegment); } path = rawPath.toString(); }