org.newsml.toolkit.explorer
Interface BaseNodePredicate


public interface BaseNodePredicate

Interface for a NewsML node test.

This interface allows applications to plug different kinds of tests into a ExplorerPanel for highlighting tree nodes, and may have other types of general applicability as well. To create a new predicate, a class needs to supply an accept(org.newsml.toolkit.BaseNode) method that takes a BaseNode as an argument and returns true if the node passes the test (i.e. it should be highlighted) or false otherwise. For examples, see the inner classes in ExplorerFrame.

Version:
2.0
Author:
Reuters PLC
See Also:
ExplorerPanel.highlight(org.newsml.toolkit.explorer.BaseNodePredicate)

Method Summary
 boolean accept(BaseNode node)
          Test a NewsML node.
 

Method Detail

accept

public boolean accept(BaseNode node)
Test a NewsML node.
Parameters:
node - The node to test.
Returns:
true if the node passes the test, false otherwise.