org.newsml.toolkit.explorer
Interface PrimaryNodePredicate
- public interface PrimaryNodePredicate
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.PrimaryNode)
method that takes a PrimaryNode
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:
- 1.0
- Author:
- Reuters PLC
- See Also:
ExplorerPanel.highlight(org.newsml.toolkit.explorer.PrimaryNodePredicate)
accept
public boolean accept(PrimaryNode node)
- Test a NewsML node.
- Parameters:
node
- The node to test.- Returns:
- true if the node passes the test, false otherwise.