Package com.germinus.easyconf
Class Filter
java.lang.Object
com.germinus.easyconf.Filter
Builds filters from arrays of strings or up to three string paramters
- Author:
- jferrer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Filter
static Filter
static Filter
static Filter
getFilterSuffix
(int n) Get a fragment of the filter which includes the first 'n' selectors concatenated.String[]
boolean
int
setSelectors
(String[] newSelectors) setVariables
(Map newVars) toString()
static Filter
usingVariables
(String var1, String value1) static Filter
usingVariables
(String var1, String value1, String var2, String value2) static Filter
static Filter
usingVariables
(Map vars)
-
Field Details
-
selectors
-
variables
-
-
Constructor Details
-
Filter
-
Filter
-
-
Method Details
-
by
-
by
-
by
-
by
-
usingVariables
-
usingVariables
-
usingVariables
-
usingVariables
-
hasVariables
public boolean hasVariables() -
setVariables
-
getVariables
-
getSelectors
-
setSelectors
-
numOfSelectors
public int numOfSelectors() -
getFilterSuffix
Get a fragment of the filter which includes the first 'n' selectors concatenated. Example: if the filter has two selectors (bar and foo). Fragments would be:- For n=2: "[bar][foo]"
- For n=1: "[bar]"
- For n=0: ""
- Otherwise: throws IllegalArgumentException
- Parameters:
n
-- Returns:
- Throws:
IllegalArgumentException
- if n invalid input: '<' 1 or n > size()
-
toString
-