public final class NodeFilters
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static @NonNull NodeFilter |
alwaysFalse()
Gets a node filter that returns a constant value of
false. |
static @NonNull NodeFilter |
alwaysTrue()
Gets a node filter that returns a constant value of
true. |
static @NonNull NodeFilter |
minimumDepth(int minimumDepth)
Gets a node filter that returns
true when the depth is at least minimumDepth. |
static @NonNull NodeFilter |
named(@NonNull java.util.Set<java.lang.String> names)
|
static @NonNull NodeFilter |
named(java.lang.String... names)
|
static @NonNull NodeFilter |
named(@NonNull java.lang.String name)
|
static @NonNull NodeFilter |
onlyAttributes()
Gets a node filter that returns
true when the node is a AttributeNode. |
static @NonNull NodeFilter |
onlyElements()
Gets a node filter that returns
true when the node is a ElementNode. |
public static @NonNull NodeFilter alwaysFalse()
false.public static @NonNull NodeFilter alwaysTrue()
true.public static @NonNull NodeFilter onlyAttributes()
true when the node is a AttributeNode.public static @NonNull NodeFilter onlyElements()
true when the node is a ElementNode.public static @NonNull NodeFilter minimumDepth(int minimumDepth)
true when the depth is at least minimumDepth.minimumDepth - the minimum depthpublic static @NonNull NodeFilter named(@NonNull java.lang.String name)
name - the namepublic static @NonNull NodeFilter named(java.lang.String... names)
names - the namespublic static @NonNull NodeFilter named(@NonNull java.util.Set<java.lang.String> names)
names - the names