notio
Class MatchResult
java.lang.Object
|
+--notio.MatchResult
- public class MatchResult
- extends java.lang.Object
A class for reporting the results of a match operation.
For most types of match, this is simply a boolean result, but
for some match types, it also contains node mappings.
Constructor Summary |
MatchResult(boolean resultFlag)
Constructs a new MatchResult with the specified result flag. |
MatchResult(NodeMapping[] newMappings)
Constructs a new MatchResult with the specified mappings. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MatchResult
public MatchResult(boolean resultFlag)
- Constructs a new MatchResult with the specified result flag.
- Parameters:
resultFlag
- a boolean value indicating whether the match was successful or not.
MatchResult
public MatchResult(NodeMapping[] newMappings)
- Constructs a new MatchResult with the specified mappings.
The array of mappings must not be null although it could be empty.
- Parameters:
newMappings
- an array of node mappings that describe the
matches found.
matchSucceeded
public boolean matchSucceeded()
- Returns true if one or matches were found.
- Returns:
- true if one or matches were found.
getNumberOfMatches
public int getNumberOfMatches()
- Returns the number of matches (mappings) found.
If no mappings were involved in the match operation, a 1 is returned.
- Returns:
- the number of matches found.
getMappings
public NodeMapping[] getMappings()
- Returns the node mappings generated by the match (if any).
If the match failed, this method will return null.
- Returns:
- an array containing node mappings generated by the match or null if the
match failed.
Copyright 1998-1999 Finnegan Southey