Package org.cesilko.rachota.core.filters
Class IdleFilter
java.lang.Object
org.cesilko.rachota.core.filters.AbstractTaskFilter
org.cesilko.rachota.core.filters.IdleFilter
Task filter allowing to filter idle tasks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRule requiring given content to be equal to task property.static final intRule requiring given content NOT to be greater than task property. -
Constructor Summary
ConstructorsConstructorDescriptionCreates new default private filter which is preset to RULE_EQUALS content rule and Boolean.TRUE.IdleFilter(int contentRule, Boolean idleProperty) Creates new idle filter. -
Method Summary
Modifier and TypeMethodDescriptionfilterTasks(Vector tasks) Applies idle filter on given tasks and returns those tasks that satisfied filter criterion.Returns required idle property of task.Returns both two available content rules of idle filter.Returns all available content values of idle filter.toString()Returns name of filter as text.Methods inherited from class org.cesilko.rachota.core.filters.AbstractTaskFilter
getContentRule, setContent, setContentRule
-
Field Details
-
RULE_EQUALS
public static final int RULE_EQUALSRule requiring given content to be equal to task property.- See Also:
-
RULE_EQUALS_NOT
public static final int RULE_EQUALS_NOTRule requiring given content NOT to be greater than task property.- See Also:
-
-
Constructor Details
-
IdleFilter
Creates new idle filter. Filter accepts only RULE_EQUALS and RULE_EQUALS_NOT content rules. Other rules will cause that tasks will not be filtered at all.- Parameters:
contentRule- One of two content rules determining private property of task.idleProperty- Required value of task private property.
-
IdleFilter
public IdleFilter()Creates new default private filter which is preset to RULE_EQUALS content rule and Boolean.TRUE.
-
-
Method Details
-
getContentRules
Returns both two available content rules of idle filter.- Overrides:
getContentRulesin classAbstractTaskFilter- Returns:
- RULE_EQUALS and RULE_EQUALS_NOT content rules.
-
getContentValues
Returns all available content values of idle filter.- Overrides:
getContentValuesin classAbstractTaskFilter- Returns:
- All content values of idle filter.
-
getContent
Returns required idle property of task.- Overrides:
getContentin classAbstractTaskFilter- Returns:
- Required idle property of task.
-
filterTasks
Applies idle filter on given tasks and returns those tasks that satisfied filter criterion.- Overrides:
filterTasksin classAbstractTaskFilter- Parameters:
tasks- Vector of tasks to be filtered.- Returns:
- Filtered tasks.
-
toString
Returns name of filter as text.- Overrides:
toStringin classAbstractTaskFilter- Returns:
- Name of filter as text.
-