Class ZPathImpl
- All Implemented Interfaces:
Resolvable,ZPath
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturn a ZPath that represents a child ZNode of this ZPath.booleanstatic ZPathstatic ZPathstatic ZPathstatic ZPathfullPath()The string full path that this ZPath representsinthashCode()booleanReturn true if this path is fully resolved (i.e.booleanisRoot()Return true/false if this is the root ZPathnodeName()The node name at this ZPathparent()Return this ZPath's parentstatic ZPathparse(String fullPath, UnaryOperator<String> nameFilter) When creating paths, any node in the path can be set toZPath.parameter().booleanstartsWith(ZPath path) Return true if this path starts with the given path.Return a regex Pattern useful for using inSchematoString()
-
Field Details
-
root
-
-
Method Details
-
parse
-
from
-
from
-
from
-
from
-
child
Description copied from interface:ZPathReturn a ZPath that represents a child ZNode of this ZPath. e.g.
ZPath.from("a", "b").at("c")represents the path "/a/b/c"The replacement is the
toString()value of child or, if it implementsNodeName, the value ofnodeName(). -
parent
Description copied from interface:ZPathReturn this ZPath's parent -
isRoot
public boolean isRoot()Description copied from interface:ZPathReturn true/false if this is the root ZPath -
startsWith
Description copied from interface:ZPathReturn true if this path starts with the given path. i.e.ZPath.from("/one/two/three").startsWith(ZPath.from("/one/two"))returns true- Specified by:
startsWithin interfaceZPath- Parameters:
path- base path- Returns:
- true/false
-
toSchemaPathPattern
Description copied from interface:ZPathReturn a regex Pattern useful for using inSchema- Specified by:
toSchemaPathPatternin interfaceZPath- Returns:
- pattern for this path
-
fullPath
Description copied from interface:ZPathThe string full path that this ZPath represents -
nodeName
Description copied from interface:ZPathThe node name at this ZPath -
equals
-
hashCode
public int hashCode() -
toString
-
resolved
Description copied from interface:ZPathWhen creating paths, any node in the path can be set to
ZPath.parameter(). At runtime, the ZPath can be "resolved" by replacing these nodes with values.The replacement is the
toString()value of the parameter object or, if the object implementsNodeName, the value ofnodeName().- Specified by:
resolvedin interfaceResolvable- Specified by:
resolvedin interfaceZPath- Parameters:
parameters- list of replacements. Must have be the same length as the number of parameter nodes in the path- Returns:
- new resolved ZPath
-
isResolved
public boolean isResolved()Description copied from interface:ZPathReturn true if this path is fully resolved (i.e. has no unresolved parameters).Note: ZPath's returned by the
parse()method are always considered fully resolved, despite if there are remaining elements in the path which appear to be parameters (but are not, i.e.{one}).When working with parameters, use the
parseWithIds()method, which returns a ZPath with a resolved state based on the presence of unresolved parameter elements in the ZPath.- Specified by:
isResolvedin interfaceZPath- Returns:
- true/false
-