|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.entityfs.support.filter.AbstractConvenientFilter<EntityView> org.entityfs.util.filter.entity.GrepFilter
public class GrepFilter
This filter matches text files that contain text that matches the filter's
regular expression pattern. It works somewhat like the Unix command grep
, hence its name.
When this filter is run, it will search through the each filtered text file to find the text it looks for. This may take a while if many files are filtered or if the text files are large.
The FGrepFilter
does not support regular expressions and should thus
be slightly faster.
FGrepFilter
Constructor Summary | |
---|---|
GrepFilter(Pattern p)
Create a new grep filter that matches text files containing text that the supplied regular expression pattern matches. |
|
GrepFilter(Pattern p,
Charset cs)
Create a new grep filter that matches text files containing text that the supplied regular expression pattern matches. |
|
GrepFilter(String pattern)
Create a new grep filter that matches text files containing text that the supplied regular expression pattern matches. |
|
GrepFilter(String pattern,
Charset cs)
Create a new grep filter that matches text files containing text that the supplied regular expression pattern matches. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
int |
hashCode()
|
boolean |
matches(EntityView object)
Does the filter match the object? |
Methods inherited from class org.entityfs.support.filter.AbstractConvenientFilter |
---|
and, bitwiseNegate, isCase, not, or, xor |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GrepFilter(String pattern)
The text files are assumed to be encoded in the platform's default character encoding.
pattern
- The regular expression pattern.public GrepFilter(Pattern p)
The text files are assumed to be encoded in the platform's default character encoding.
p
- The regular expression pattern.public GrepFilter(String pattern, Charset cs)
pattern
- The regular expression pattern.cs
- The character encoding of the text files. If this parameter is
set to null
, the platform's default charset is used.public GrepFilter(Pattern p, Charset cs)
p
- The regular expression pattern.cs
- The character encoding of the text files. If this parameter is
set to null
, the platform's default charset is used.Method Detail |
---|
public boolean matches(EntityView object)
Filter
matches
in interface Filter<EntityView>
object
- The object to match.
true
if the filter matches the object.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |