|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.text.AStringFilter
org.pf.text.StringCollectionFilter
public class StringCollectionFilter
This filter is based on a collection of strings. It matches all strings that are in the underlying collection. By default it compares case-insensitive. Case sensitivity must be switched on explicitly.
| Constructor Summary | |
|---|---|
StringCollectionFilter(java.util.Collection strings)
Initialize the new instance with a collection of strings. |
|
StringCollectionFilter(java.lang.String strings)
Initialize the new instance with a List of strings provided as one string where the values are separated by comma (","). |
|
StringCollectionFilter(java.lang.String[] strings)
Initialize the new instance with an array of strings. |
|
StringCollectionFilter(java.lang.String strings,
java.lang.String separators)
Initialize the new instance with a List of strings provided as one string where the values are separated by the specified separators. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.String string)
Add the given string to the internal string collection. |
boolean |
getIgnoreCase()
Returns true if the string comparison is done case-insensitive |
boolean |
matches(java.lang.String string)
Returns true if the given string is in the internal collection of strings. |
boolean |
matchesIfInCollection()
Returns true if this filter matches a string if it is found in the internal collection. |
void |
negate()
Inverts the (match) logic of this filter |
void |
setIgnoreCase(boolean newValue)
Sets whether or not the string comparison is done case-insensitive |
| Methods inherited from class org.pf.text.AStringFilter |
|---|
matches |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringCollectionFilter(java.lang.String[] strings)
strings - The strings that define the set that matches this filterpublic StringCollectionFilter(java.util.Collection strings)
strings - A list that must only contain String objects
public StringCollectionFilter(java.lang.String strings,
java.lang.String separators)
strings - The strings to add (separated values)separators - Each charater is treated as a separator between two string valuespublic StringCollectionFilter(java.lang.String strings)
strings - The strings to add (comma separated values)| Method Detail |
|---|
public boolean getIgnoreCase()
public void setIgnoreCase(boolean newValue)
public boolean matches(java.lang.String string)
string - The string to look up in the collectionpublic void negate()
public boolean matchesIfInCollection()
public void add(java.lang.String string)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||