public class PriorityFilter extends AbstractTaskFilter
Modifier and Type | Field and Description |
---|---|
static int |
RULE_EQUALS
Rule requiring given content to be equal to task property.
|
static int |
RULE_EQUALS_NOT
Rule requiring given content NOT to be greater than task property.
|
Constructor and Description |
---|
PriorityFilter()
Creates new default priority filter which is preset to RULE_EQUALS
content rule and Task.PRIORITY_LOW.
|
PriorityFilter(int contentRule,
java.lang.Integer priority)
Creates new priority filter.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector |
filterTasks(java.util.Vector tasks)
Applies priority filter on given tasks and returns those tasks
that satisfied filter criterion.
|
java.lang.String |
getContent()
Returns required priority value of task.
|
java.util.Vector |
getContentRules()
Returns both two available content rules of priority filter.
|
java.util.Vector |
getContentValues()
Returns all available content values of priority filter.
|
java.lang.String |
toString()
Returns name of filter as text.
|
getContentRule, setContent, setContentRule
public static final int RULE_EQUALS
public static final int RULE_EQUALS_NOT
public PriorityFilter(int contentRule, java.lang.Integer priority)
contentRule
- One of two content rules determining allowed value of task priority.priority
- Priority level that must be equal/different than task priority.public PriorityFilter()
public java.util.Vector getContentRules()
getContentRules
in class AbstractTaskFilter
public java.util.Vector getContentValues()
getContentValues
in class AbstractTaskFilter
public java.lang.String getContent()
getContent
in class AbstractTaskFilter
public java.util.Vector filterTasks(java.util.Vector tasks)
filterTasks
in class AbstractTaskFilter
tasks
- Vector of tasks to be filtered.public java.lang.String toString()
toString
in class AbstractTaskFilter