|
JDOM2 0.0.2-BETA |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdom2.filter.ElementFilter
public class ElementFilter
A Filter that only matches Element objects.
| Constructor Summary | |
|---|---|
ElementFilter()
Select only the Elements. |
|
ElementFilter(Namespace namespace)
Select only the Elements with the supplied Namespace. |
|
ElementFilter(java.lang.String name)
Select only the Elements with the supplied name in any Namespace. |
|
ElementFilter(java.lang.String name,
Namespace namespace)
Select only the Elements with the supplied name and Namespace. |
|
| Method Summary | ||
|---|---|---|
Filter<?> |
and(Filter<?> filter)
Creates an ANDing filter |
|
boolean |
equals(java.lang.Object obj)
Returns whether the two filters are equivalent (i.e. the matching names and namespace are equivalent). |
|
java.util.List<T> |
filter(java.util.List<?> content)
Filter the input list of all content except that which matches the Filter. |
|
Element |
filter(java.lang.Object content)
Check to see if the object matches a predefined set of rules. |
|
int |
hashCode()
|
|
boolean |
matches(java.lang.Object content)
Check to see if the object matches a predefined set of rules. |
|
Filter<?> |
negate()
Creates an 'inverse' filter |
|
Filter<? extends Content> |
or(Filter<?> filter)
Creates an ORing filter |
|
|
refine(Filter<R> filter)
This is similar to the and(Filter) method except the generic type is different. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ElementFilter()
public ElementFilter(java.lang.String name)
name - The name of the Element.public ElementFilter(Namespace namespace)
namespace - The namespace the Element lives in.
public ElementFilter(java.lang.String name,
Namespace namespace)
name - The name of the Element.namespace - The namespace the Element lives in.| Method Detail |
|---|
public Element filter(java.lang.Object content)
content - The object to verify.
true if the objected matched a predfined
set of rules.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare against
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic final boolean matches(java.lang.Object content)
Filter
matches in interface Filter<T>content - The object to verify.
true if the object matches a predfined
set of rules.public java.util.List<T> filter(java.util.List<?> content)
Filter
filter in interface Filter<T>content - The content to filter.
public final Filter<?> negate()
Filter
negate in interface Filter<T>public final Filter<? extends Content> or(Filter<?> filter)
Filter
or in interface Filter<T>filter - a second Filter to OR with.
public final Filter<?> and(Filter<?> filter)
Filter
and in interface Filter<T>filter - a second Filter to AND with.
public <R> Filter<R> refine(Filter<R> filter)
Filter
refine in interface Filter<T>R - The Generic type of the retuned data is taken from the input
instance.filter - The filter to refine our results with.
|
JDOM2 0.0.2-BETA |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||