| java.lang.Object net.sourceforge.chaperon.process.PatternProcessor
PatternProcessor | public class PatternProcessor (Code) | | Processor for pattern, which try for matching against a pattern.
author: Stephan Michels version: CVS $Id: PatternProcessor.java,v 1.9 2003/12/09 19:55:53 benedikta Exp $ |
Method Summary | |
public String | getGroup() Return the text, which in last match was found. | public String | getGroup(int group) Return the text of the specifed group, which in last match was found. | public int | getGroupCount() Return count of groups. | public int | getGroupEnd() Return the end position of the last match. | public int | getGroupEnd(int group) Return the end position of a group from the last match.
Parameters: group - Index of group. | public int | getGroupStart() Return the start position of the last match. | public int | getGroupStart(int group) Return the start position of a group from the last match.
Parameters: group - Index of group. | public boolean | match(char[] text) Matches for pattern.
Parameters: text - Text. | public boolean | match(char[] text, int start) Matches for pattern at specified position within the text.
Parameters: text - Text Parameters: start - Position within the text. | public boolean | search(char[] text) Search a postion, where the processor is successful.
Parameters: text - Text. | public boolean | search(char[] text, int start) Search a postion, where the processor is successful.
Parameters: text - Text. Parameters: start - Start position within the text. | public void | setPatternAutomaton(PatternAutomaton automaton) Set the pattern automaton. | public void | setVerbose(boolean verbose) |
PatternProcessor | public PatternProcessor()(Code) | | Create a new pattern processor.
|
PatternProcessor | public PatternProcessor(PatternAutomaton automaton)(Code) | | Create a new pattern processor.
Parameters: automaton - Automaton, which the processor should use. |
getGroup | public String getGroup()(Code) | | Return the text, which in last match was found.
Text. |
getGroup | public String getGroup(int group)(Code) | | Return the text of the specifed group, which in last match was found.
Parameters: group - Index of group; Text |
getGroupCount | public int getGroupCount()(Code) | | Return count of groups.
Count of groups. |
getGroupEnd | public int getGroupEnd()(Code) | | Return the end position of the last match.
End position. |
getGroupEnd | public int getGroupEnd(int group)(Code) | | Return the end position of a group from the last match.
Parameters: group - Index of group. End position. |
getGroupStart | public int getGroupStart()(Code) | | Return the start position of the last match.
Start position. |
getGroupStart | public int getGroupStart(int group)(Code) | | Return the start position of a group from the last match.
Parameters: group - Index of group. Start position. |
match | public boolean match(char[] text)(Code) | | Matches for pattern.
Parameters: text - Text. True, if the processor matches successfully. |
match | public boolean match(char[] text, int start)(Code) | | Matches for pattern at specified position within the text.
Parameters: text - Text Parameters: start - Position within the text. True, if the processor matches successfully. |
search | public boolean search(char[] text)(Code) | | Search a postion, where the processor is successful.
Parameters: text - Text. Next first position where the parser is successfull otherwise -1. |
search | public boolean search(char[] text, int start)(Code) | | Search a postion, where the processor is successful.
Parameters: text - Text. Parameters: start - Start position within the text. Next first position where the parser is successfull otherwise -1. |
setPatternAutomaton | public void setPatternAutomaton(PatternAutomaton automaton)(Code) | | Set the pattern automaton.
Parameters: automaton - Automaton, which the processor should use. |
setVerbose | public void setVerbose(boolean verbose)(Code) | | |
|
|