Class Filters
java.lang.Object
org.jdom2.filter.Filters
Factory class of convenience methods to create Filter instances of common
types. Methods that return Filters that act on core JDOM classes (Element,
Text, etc.) are simply named after the content they return.
Filters that match non-core classes (Boolean, Object, etc.) are all prefixed with the letter 'f' (for filter).
The Filter returned by fpassthrough() is not really a filter in the
sense that it will never filter anything out - everything matches. This can
be useful to accomplish some tasks, for example the JDOM XPath API uses it
extensively.
- Author:
- Rolf Lear
-
Method Summary
Modifier and TypeMethodDescriptionReturn a Filter that matches anyAttributedata.Return a Filter that matches anyAttributedata with the specified name.Return a Filter that matches anyAttributedata with the specified name and namespace.Return a Filter that matches anyAttributedata with the specified namespace.cdata()Return a Filter that matches anyCDATAdata.comment()Return a Filter that matches anyCommentdata.content()Return a Filter that matches anyContentdata.doctype()Return a Filter that matches anyDocTypedata.document()Return a Filter that matches anyDocumentdata.element()Return a Filter that matches anyElementdata.Return a Filter that matches anyElementdata with the specified name.Return a Filter that matches anyElementdata with the specified name and Namespace.Return a Filter that matches anyElementdata with the specified Namespace.Return a Filter that matches anyEntityRefdata.fboolean()Return a Filter that matches any Boolean data.static final <F> Filter<F> Return a Filter that matches any data of the specified Class.fdouble()Return a Filter that matches any Double data.Return a filter that does no filtering at all - everything matches.fstring()Return a Filter that matches any String data.static final Filter<ProcessingInstruction> Return a Filter that matches anyProcessingInstructiondata.text()textOnly()
-
Method Details
-
content
-
attribute
-
attribute
-
attribute
-
attribute
-
comment
-
cdata
-
doctype
-
entityref
-
element
-
document
-
element
-
element
-
element
-
processinginstruction
Return a Filter that matches anyProcessingInstructiondata.- Returns:
- a Filter that matches any
ProcessingInstructiondata.
-
text
-
textOnly
-
fboolean
-
fstring
-
fdouble
-
fclass
Return a Filter that matches any data of the specified Class.- Type Parameters:
F- The generic type of the content returned by this Filter- Parameters:
clazz- the Class type to match in the filter- Returns:
- a Filter that matches any data of the specified Class.
-
fpassthrough
-