org.xwiki.gwt.dom.client.filter
Class WithAttribute
java.lang.Object
org.xwiki.gwt.dom.client.filter.WithAttribute
- All Implemented Interfaces:
- NodeFilter
public class WithAttribute
- extends Object
- implements NodeFilter
Accepts only elements with the given attribute.
- Version:
- $Id: f52542be66493ead7b21874d38cda3b586b03401 $
|
Constructor Summary |
WithAttribute(String name)
Creates a new filter that accepts only elements that have the specified attribute. |
WithAttribute(String name,
String value)
Creates a new filter that accepts only elements that have the specified attribute set to the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WithAttribute
public WithAttribute(String name)
- Creates a new filter that accepts only elements that have the specified attribute.
- Parameters:
name - the name of the attribute to look for
WithAttribute
public WithAttribute(String name,
String value)
- Creates a new filter that accepts only elements that have the specified attribute set to the given value. If the
value is
null then only the presence of the attribute is checked.
- Parameters:
name - the name of the attribute to look forvalue - the value of the attribute, null to match any value
acceptNode
public NodeFilter.Action acceptNode(com.google.gwt.dom.client.Node node)
- Description copied from interface:
NodeFilter
- Applies this filter on the given DOM node.
- Specified by:
acceptNode in interface NodeFilter
- Parameters:
node - the node to be filtered
- Returns:
- the action that should be taken on the filtered node by the calling iterator
Copyright © 2004–2015 XWiki. All rights reserved.