|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.chaperon.process.PatternProcessor
public class PatternProcessor
Processor for pattern, which try for matching against a pattern.
Constructor Summary | |
---|---|
PatternProcessor()
Create a new pattern processor. |
|
PatternProcessor(PatternAutomaton automaton)
Create a new pattern processor. |
Method Summary | |
---|---|
java.lang.String |
getGroup()
Return the text, which in last match was found. |
java.lang.String |
getGroup(int group)
Return the text of the specifed group, which in last match was found. |
int |
getGroupCount()
Return count of groups. |
int |
getGroupEnd()
Return the end position of the last match. |
int |
getGroupEnd(int group)
Return the end position of a group from the last match. |
int |
getGroupStart()
Return the start position of the last match. |
int |
getGroupStart(int group)
Return the start position of a group from the last match. |
boolean |
match(char[] text)
Matches for pattern. |
boolean |
match(char[] text,
int start)
Matches for pattern at specified position within the text. |
boolean |
search(char[] text)
Search a postion, where the processor is successful. |
boolean |
search(char[] text,
int start)
Search a postion, where the processor is successful. |
void |
setPatternAutomaton(PatternAutomaton automaton)
Set the pattern automaton. |
void |
setVerbose(boolean verbose)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PatternProcessor()
public PatternProcessor(PatternAutomaton automaton)
automaton
- Automaton, which the processor should use.Method Detail |
---|
public void setPatternAutomaton(PatternAutomaton automaton)
automaton
- Automaton, which the processor should use.public boolean search(char[] text)
text
- Text.
public boolean search(char[] text, int start)
text
- Text.start
- Start position within the text.
public void setVerbose(boolean verbose)
public boolean match(char[] text)
text
- Text.
public boolean match(char[] text, int start)
text
- Textstart
- Position within the text.
public java.lang.String getGroup()
public java.lang.String getGroup(int group)
group
- Index of group;
public int getGroupCount()
public int getGroupStart()
public int getGroupStart(int group)
group
- Index of group.
public int getGroupEnd()
public int getGroupEnd(int group)
group
- Index of group.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |