org.jaxen.pattern

Class UnionPattern


public class UnionPattern
extends Pattern

UnionPattern represents a union pattern.
Version:
$Revision: 1.8 $
Author:
James Strachan

Field Summary

private Pattern
lhs
private String
matchesNodeName
private short
nodeType
private Pattern
rhs

Fields inherited from class org.jaxen.pattern.Pattern

ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, NO_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE

Constructor Summary

UnionPattern()
UnionPattern(Pattern lhs, Pattern rhs)

Method Summary

Pattern
getLHS()
short
getMatchType()
String
getMatchesNodeName()
Pattern
getRHS()
String
getText()
Pattern[]
getUnionPatterns()
private void
init()
boolean
matches(Object node, Context context)
void
setLHS(Pattern lhs)
void
setRHS(Pattern rhs)
Pattern
simplify()
String
toString()

Methods inherited from class org.jaxen.pattern.Pattern

getMatchType, getMatchesNodeName, getPriority, getText, getUnionPatterns, matches, simplify

Field Details

lhs

private Pattern lhs

matchesNodeName

private String matchesNodeName

nodeType

private short nodeType

rhs

private Pattern rhs

Constructor Details

UnionPattern

public UnionPattern()

UnionPattern

public UnionPattern(Pattern lhs,
                    Pattern rhs)

Method Details

getLHS

public Pattern getLHS()

getMatchType

public short getMatchType()
Overrides:
getMatchType in interface Pattern

getMatchesNodeName

public String getMatchesNodeName()
Overrides:
getMatchesNodeName in interface Pattern

getRHS

public Pattern getRHS()

getText

public String getText()
Overrides:
getText in interface Pattern

getUnionPatterns

public Pattern[] getUnionPatterns()
Overrides:
getUnionPatterns in interface Pattern

init

private void init()

matches

public boolean matches(Object node,
                       Context context)
            throws JaxenException
Overrides:
matches in interface Pattern
Returns:
true if the pattern matches the given node

setLHS

public void setLHS(Pattern lhs)

setRHS

public void setRHS(Pattern rhs)

simplify

public Pattern simplify()
Overrides:
simplify in interface Pattern

toString

public String toString()