|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.Fissures.seed.builder.BuilderFilter
public abstract class BuilderFilter
Abstract class for all filters applied to Builders. These filters act as a 'request template' to help Builders select which objects to keep and which to throw out as they are built. The filter consists of one or more 'parameters', which are value/key pairs that are used in comparison to the contents of a built object. When the qualify() method is used, the built object passed to the filter determines whether the object fits the criteria or not. The list of parameters can have the same key many times over, with different values. This is interpreted in an OR fashion, where a match to any one of the values will result in a passing grade. Glob-style wildcards ('?','*') can be used in a parameter value to generalize the matching criteria even further.
Field Summary | |
---|---|
protected java.lang.String |
filterType
|
protected java.util.HashMap |
parameterMap
|
protected java.util.Iterator |
paramIterator
|
Constructor Summary | |
---|---|
BuilderFilter()
Create new Builder Filter. |
Method Summary | |
---|---|
void |
addParameter(java.lang.String key,
java.lang.String value)
Add a key/value pair to the filter. |
java.lang.String[] |
getNext()
Get the next key/value pair from the iterator. |
java.util.Vector |
getParameter(java.lang.String key)
Get filter parameter(s). |
java.lang.String |
getType()
Get filter type. |
protected boolean |
globMatch(java.lang.String criteria,
java.lang.String value)
Glob-match value to criteria. |
int |
iterate()
Set up the iterator. |
protected int |
numCompare(java.lang.String value1,
java.lang.String value2)
Compare two numeric or Btime strings to each other. |
abstract boolean |
qualify(java.lang.Object o)
Comparative method that accepts and object of expected type and compares the instance values within to the parameter list in this filter. |
void |
reset()
Reset the filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap parameterMap
protected java.util.Iterator paramIterator
protected java.lang.String filterType
Constructor Detail |
---|
public BuilderFilter()
Method Detail |
---|
public java.lang.String getType() throws BuilderException
BuilderException
public void addParameter(java.lang.String key, java.lang.String value)
public java.util.Vector getParameter(java.lang.String key)
public void reset()
public int iterate()
public java.lang.String[] getNext()
public abstract boolean qualify(java.lang.Object o) throws BuilderException
BuilderException
protected boolean globMatch(java.lang.String criteria, java.lang.String value)
protected int numCompare(java.lang.String value1, java.lang.String value2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |