org.xwiki.gwt.dom.client.filter
Class WithAttribute

java.lang.Object
  extended by 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$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.gwt.dom.client.filter.NodeFilter
NodeFilter.Action
 
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.
 
Method Summary
 NodeFilter.Action acceptNode(com.google.gwt.dom.client.Node node)
          Applies this filter on the given DOM node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 for
value - the value of the attribute, null to match any value
Method Detail

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-2012 XWiki. All Rights Reserved.