Package cdc.util.data.paths
Class SPath
- java.lang.Object
-
- cdc.util.data.paths.SPath
-
public final class SPath extends Object
Simple path.It must have the form:
(part/)*partor(part(/part)*)?@part- Author:
- Damien Carbonne
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)List<String>getParts()inthashCode()booleanisAttribute()booleanisElement()booleanmatchesAttribute(Element parent, String name)Returnstrueif this SPath matches an attribute in an element.booleanmatchesElement(Parent parent)booleanmatchesElement(Parent parent, String name)Returnstrueif this SPath matches an element.static Predicate<Element>toStandardPredicate(Collection<SPath> paths)StringtoString()
-
-
-
Constructor Detail
-
SPath
public SPath(String text)
-
-
Method Detail
-
isAttribute
public boolean isAttribute()
-
isElement
public boolean isElement()
-
matchesElement
public boolean matchesElement(Parent parent)
-
matchesElement
public boolean matchesElement(Parent parent, String name)
Returnstrueif this SPath matches an element.- Parameters:
parent- The parent element.name- The name of the child element.- Returns:
trueif this SPath matcheschildunderparent.
-
matchesAttribute
public boolean matchesAttribute(Element parent, String name)
Returnstrueif this SPath matches an attribute in an element.- Parameters:
parent- The element.name- The attribute name.- Returns:
trueif this SPath matches an attribute namednameinparent.
-
toStandardPredicate
public static Predicate<Element> toStandardPredicate(Collection<SPath> paths)
-
-