Remove findChildNodesWithXPathChecked from Node interface
This commit is contained in:
@@ -382,17 +382,6 @@ public abstract class AbstractNode implements Node {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T extends Node> List<T> findChildNodesWithXPathChecked(Class<T> clazz, String xpathString) throws JaxenException {
|
||||
List<Node> found = findChildNodesWithXPath(xpathString);
|
||||
List<T> result = new ArrayList<>();
|
||||
for (Node n : found) {
|
||||
result.add(clazz.cast(n));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasDescendantMatchingXPath(String xpathString) {
|
||||
try {
|
||||
|
@@ -228,20 +228,6 @@ public interface Node {
|
||||
*/
|
||||
List<? extends Node> findChildNodesWithXPath(String xpathString) throws JaxenException;
|
||||
|
||||
/**
|
||||
* Returns all the nodes matching the xpath expression and casts the nodes to a specific type.
|
||||
*
|
||||
* @param clazz
|
||||
* the class of the result component type
|
||||
* @param xpathString
|
||||
* the expression to check
|
||||
* @return List of all matching nodes. Returns an empty list if none found.
|
||||
*
|
||||
* @throws JaxenException if the xpath is incorrect or fails altogether
|
||||
* @throws ClassCastException if the nodes found with the xpath exception cannot be cast.
|
||||
*/
|
||||
<T extends Node> List<T> findChildNodesWithXPathChecked(Class<T> clazz, String xpathString) throws JaxenException;
|
||||
|
||||
/**
|
||||
* Checks whether at least one descendant matches the xpath expression.
|
||||
*
|
||||
|
Reference in New Issue
Block a user