Forge - Parent 1.2.2-SNAPSHOT

org.jboss.forge.parser.xml.query
Interface Query<T>

Type Parameters:
T - Expected return value from executing a query
All Known Implementing Classes:
CreateQuery, GetOrCreateQuery, GetQuery, GetSingleQuery

public interface Query<T>

Contract for something capable of executing a query (collection of Patterns) upon a Node to find a match or matches. May be used for search, creation, etc.

Author:
Aslak Knutsen, ALR

Method Summary
 T execute(Node node, Pattern... patterns)
          Queries the tree starting at the specified Node for the specified Patterns.
 

Method Detail

execute

T execute(Node node,
          Pattern... patterns)
          throws IllegalArgumentException
Queries the tree starting at the specified Node for the specified Patterns.

Parameters:
node - The Node to use as a reference point
patterns - The Patterns to match
Returns:
The expressed value or null if not found.
Throws:
IllegalArgumentException - If the Node is not specified or no Patterns are specified

Forge - Parent 1.2.2-SNAPSHOT

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.