|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.data.CollectionUtils.FilterExpression
public static class CollectionUtils.FilterExpression
Filter expression constructed by a string for use by
CollectionUtils.filter(Collection, FilterExpression, IFilterableValueDecorator)
. The filter expression uses the standard common search keyword rules (*
= wildcard, space = and, quotes = exact phrase).
Field Summary | |
---|---|
protected List |
m_patterns
List< of individual patterns |
protected String |
m_string
Expression string. |
protected static Pattern |
RE_EMPTY
Pattern for matching whitespace, stars, and quotes |
protected static Pattern |
RE_QUOTED
Pattern for matching anything inside quotes (inclusive) |
protected static Pattern |
RE_WILDCARD
Wildcard Pattern |
Constructor Summary | |
---|---|
CollectionUtils.FilterExpression(String s)
Creates a new filter expression object from the specified string. |
Method Summary | |
---|---|
void |
filter(Collection collection,
CollectionUtils.IFilterableValueDecorator valueDecorator)
Removes the items from the specified collection whose value does not match the filter. |
String |
getExpressionString()
Expression string. |
boolean |
matches(String s)
True if the specified string matches this expression. |
void |
setExpressionString(String s)
Expression string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Pattern RE_EMPTY
Pattern
for matching whitespace, stars, and quotes
protected static Pattern RE_QUOTED
Pattern
for matching anything inside quotes (inclusive)
protected static Pattern RE_WILDCARD
Pattern
protected String m_string
protected List m_patterns
List<Pattern
>
of individual patterns
Constructor Detail |
---|
public CollectionUtils.FilterExpression(String s)
Method Detail |
---|
public String getExpressionString()
public void setExpressionString(String s)
public boolean matches(String s)
public void filter(Collection collection, CollectionUtils.IFilterableValueDecorator valueDecorator)
collection
- Items to filter. The collection will be iterated,
and the iterator's remove()
method will be called
for each item that does not match the filter.valueDecorator
- Decorator to use to calculate the value on which to filter
for each item in the collection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |