|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.lightest.core.filter.ComparisonFilter
public abstract class ComparisonFilter
Filters an attribute related to the test method based on a value and an operation with that value. The case sensitivity of the filtering can be set. Filtering is case-sensitive by default.
| Constructor Summary | |
|---|---|
ComparisonFilter()
|
|
| Method Summary | |
|---|---|
abstract boolean |
compare(Object value,
Object attributeValue)
Returns true if the comparison criteria is satisfied, false otherwise. |
abstract Object |
getAttributeValue(Object field,
Method m)
Returns the method attribute identified by the given field. |
Object |
getField()
|
groovy.lang.MetaClass |
getMetaClass()
|
Object |
getProperty(String name)
|
Object |
getValue()
|
Object |
invokeMethod(String name,
Object args)
|
boolean |
isCaseSensitive()
|
void |
setCaseSensitive(boolean caseSensitive)
Sets whether the comparison should be case sensitive for Strings. |
void |
setField(Object value)
|
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setProperty(String name,
Object value)
|
void |
setValue(Object value)
|
boolean |
test(Method m)
Compares the test method's attribute value as obtained by getAttributeValue() with the defined value, using compare() for the compare operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.googlecode.lightest.core.filter.ITestFilter |
|---|
filterString |
| Constructor Detail |
|---|
public ComparisonFilter()
| Method Detail |
|---|
public Object getField()
public void setField(Object value)
public Object getValue()
public void setValue(Object value)
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - case-sensitive if true, not if falsepublic boolean isCaseSensitive()
public boolean test(Method m)
test in interface ITestFilterm -
public abstract boolean compare(Object value,
Object attributeValue)
value - the value to compare againstattributeValue - the value being compared
public abstract Object getAttributeValue(Object field,
Method m)
field - the field to getm - the method for which to retrive the attribute valuepublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass in interface groovy.lang.GroovyObject
public Object invokeMethod(String name,
Object args)
invokeMethod in interface groovy.lang.GroovyObjectpublic Object getProperty(String name)
getProperty in interface groovy.lang.GroovyObject
public void setProperty(String name,
Object value)
setProperty in interface groovy.lang.GroovyObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||