Package org.xmlunit.diff
Class NodeFilters
- java.lang.Object
-
- org.xmlunit.diff.NodeFilters
-
public final class NodeFilters extends java.lang.Object
Common NodeFilter implementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NodeFilters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicate<org.w3c.dom.Node>
satifiesAll(Predicate<org.w3c.dom.Node>... predicates)
Accepts nodes that are accepted by all given filters.static Predicate<org.w3c.dom.Node>
satifiesAny(Predicate<org.w3c.dom.Node>... predicates)
Accepts nodes that are accepted by at least on of the given filters.
-
-
-
Field Detail
-
Default
public static final Predicate<org.w3c.dom.Node> Default
Suppresses document-type and XML declaration nodes.This is the default used by
AbstractDifferenceEngine
and thusDOMDifferenceEngine
.
-
AcceptAll
public static final Predicate<org.w3c.dom.Node> AcceptAll
Accepts all nodes.- Since:
- XMLUnit 2.6.0
-
-
Method Detail
-
satifiesAll
public static Predicate<org.w3c.dom.Node> satifiesAll(Predicate<org.w3c.dom.Node>... predicates)
Accepts nodes that are accepted by all given filters.This short-circuits the given list of predicates and returns
false
as soon as the first predicate does.- Parameters:
predicates
- predicates to test- Returns:
- combined predicates
- Since:
- XMLUnit 2.9.0
-
satifiesAny
public static Predicate<org.w3c.dom.Node> satifiesAny(Predicate<org.w3c.dom.Node>... predicates)
Accepts nodes that are accepted by at least on of the given filters.This short-circuits the given list of predicates and returns
true
as soon as the first predicate does.- Parameters:
predicates
- predicates to test- Returns:
- combined predicates
- Since:
- XMLUnit 2.9.0
-
-