|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectise.antelope.tasks.Grep
public class Grep
Borrowed from Antelope, modified to be a general purpose class instead of an Ant task.
Constructor Summary | |
---|---|
Grep()
|
Method Summary | |
---|---|
int |
getCount()
|
java.lang.String |
getMatch()
|
java.lang.String |
getMatch(int i)
|
java.util.Iterator |
getMatches()
|
java.lang.String |
grep()
Do the grep |
void |
setAllmatches(boolean b)
If true, concatentates all matches into a single result, if false, only the first match is returned in the result. |
void |
setCanoneq(boolean b)
Sets the canoneq attribute for the regex. |
void |
setCaseinsensitive(boolean b)
Sets the caseinsensitive attribute for the regex. |
void |
setComments(boolean b)
Sets the comments attribute for the regex. |
void |
setDotall(boolean b)
Sets the dotall attribute for the regex. |
void |
setGroup(int g)
Set a specific group from the regex. |
void |
setIn(java.lang.String string)
Where to look. |
void |
setMultiline(boolean b)
Sets the multiline attribute for the regex. |
void |
setRegex(java.lang.String regex)
What to look for. |
void |
setSeparator(java.lang.String s)
Used in conjunction with setAllmatches , this string will be
placed between each match in the final result. |
void |
setUnicodecase(boolean b)
Sets the unicodecase attribute for the regex. |
void |
setUnixlines(boolean b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Grep()
Method Detail |
---|
public void setIn(java.lang.String string)
string
- The new in valuepublic void setRegex(java.lang.String regex)
regex
- The new regex valuepublic void setGroup(int g)
g
- The new group valuepublic void setDotall(boolean b)
b
- The new dotall valuepublic void setCaseinsensitive(boolean b)
b
- The new caseinsensitive valuepublic void setMultiline(boolean b)
b
- The new multiline valuepublic void setUnicodecase(boolean b)
b
- The new unicodecase valuepublic void setCanoneq(boolean b)
b
- The new canoneq valuepublic void setComments(boolean b)
b
- The new comments valuepublic void setUnixlines(boolean b)
public void setAllmatches(boolean b)
b
- default is false, only show the first match.public int getCount()
public java.lang.String getMatch()
setSeparator
public java.util.Iterator getMatches()
public java.lang.String getMatch(int i)
i
th match.public void setSeparator(java.lang.String s)
setAllmatches
, this string will be
placed between each match in the final result.
s
- the separator, default is "".public java.lang.String grep()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |