Package tigase.xml
Class Path
java.lang.Object
tigase.xml.Path
Path holds predicates that need to be matched to find child (element within a tree of elements).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException thrown if it is not possible to parse String into pathprotected static class -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable ElementMethod filters passed element children (and subchildren) and returns first child matching this pathevaluateAll(@NonNull Element element) Method filters passed element children (and subchildren) and returns children matching this pathinthashCode()static @NonNull PathnameAndXmlns(@NonNull String name, @NonNull String xmlns) static @NonNull PathSimplified for to ease transition from String[] to Path.static @NonNull Pathof(@NonNull ElementMatcher... matchers) Method for creatingPathfromElementMatchers.static @NonNull PathMethod parsesStringinto paththen(ElementMatcher matcher) Method for building a new path by adding additional element matcher to the end of the pathtoString()
-
Method Details
-
parse
Method parsesStringinto path- Parameters:
text-- Returns:
- Throws:
Path.PathFormatException
-
of
Simplified for to ease transition from String[] to Path.- Parameters:
matcherStrings-- Returns:
- Throws:
Path.PathFormatException
-
of
Method for creatingPathfromElementMatchers. Each matcher is responsible for filtering nodes at one level of the elements tree.- Parameters:
matchers-- Returns:
-
nameAndXmlns
-
evaluate
Method filters passed element children (and subchildren) and returns first child matching this path- Parameters:
element-- Returns:
-
evaluateAll
Method filters passed element children (and subchildren) and returns children matching this path- Parameters:
element-- Returns:
-
then
Method for building a new path by adding additional element matcher to the end of the path -
toString
-
equals
-
hashCode
public int hashCode()
-