com.germinus.easyconf
Class Filter
java.lang.Object
com.germinus.easyconf.Filter
- public class Filter
- extends java.lang.Object
Builds filters from arrays of strings or up to three string paramters
- Author:
- jferrer
Method Summary |
static Filter |
by(java.lang.String first)
|
static Filter |
by(java.lang.String[] selectors)
|
static Filter |
by(java.lang.String first,
java.lang.String second)
|
static Filter |
by(java.lang.String first,
java.lang.String second,
java.lang.String third)
|
java.lang.String |
getFilterSuffix(int n)
Get a fragment of the filter which includes the first 'n' selectors
concatenated.
|
java.lang.String[] |
getSelectors()
|
java.util.Map |
getVariables()
|
boolean |
hasVariables()
|
int |
numOfSelectors()
|
Filter |
setSelectors(java.lang.String[] newSelectors)
|
Filter |
setVariables(java.util.Map newVars)
|
java.lang.String |
toString()
|
static Filter |
usingVariables(java.util.Map vars)
|
static Filter |
usingVariables(java.lang.String var1,
java.lang.String value1)
|
static Filter |
usingVariables(java.lang.String var1,
java.lang.String value1,
java.lang.String var2,
java.lang.String value2)
|
static Filter |
usingVariables(java.lang.String var1,
java.lang.String value1,
java.lang.String var2,
java.lang.String value2,
java.lang.String var3,
java.lang.String value3)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
by
public static Filter by(java.lang.String first)
by
public static Filter by(java.lang.String first,
java.lang.String second)
by
public static Filter by(java.lang.String first,
java.lang.String second,
java.lang.String third)
by
public static Filter by(java.lang.String[] selectors)
usingVariables
public static Filter usingVariables(java.lang.String var1,
java.lang.String value1)
usingVariables
public static Filter usingVariables(java.lang.String var1,
java.lang.String value1,
java.lang.String var2,
java.lang.String value2)
usingVariables
public static Filter usingVariables(java.lang.String var1,
java.lang.String value1,
java.lang.String var2,
java.lang.String value2,
java.lang.String var3,
java.lang.String value3)
usingVariables
public static Filter usingVariables(java.util.Map vars)
hasVariables
public boolean hasVariables()
setVariables
public Filter setVariables(java.util.Map newVars)
getVariables
public java.util.Map getVariables()
getSelectors
public java.lang.String[] getSelectors()
setSelectors
public Filter setSelectors(java.lang.String[] newSelectors)
numOfSelectors
public int numOfSelectors()
getFilterSuffix
public java.lang.String getFilterSuffix(int n)
- 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:
java.lang.IllegalArgumentException
- if n < 1 or n > size()
toString
public java.lang.String toString()
Copyright © 2005 EasyConf team. All Rights Reserved.