public class DurationFilter extends AbstractTaskFilter
Modifier and Type | Field and Description |
---|---|
static int |
RULE_LESS_THAN
Rule requiring given content NOT to be smaller than task property.
|
static int |
RULE_MORE_THAN
Rule requiring given content NOT to be greater than task property.
|
Constructor and Description |
---|
DurationFilter()
Creates new default duration filter which is preset to RULE_MORE_THAN
content rule and zero duration.
|
DurationFilter(int contentRule,
java.lang.Long duration)
Creates new duration filter.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector |
filterTasks(java.util.Vector tasks)
Applies duration filter on given tasks and returns those tasks
that satisfied filter criterion.
|
java.util.Vector |
getContentRules()
Returns both available content rules of duration filter.
|
java.lang.String |
toString()
Returns name of filter as text.
|
getContent, getContentRule, getContentValues, setContent, setContentRule
public static final int RULE_MORE_THAN
public static final int RULE_LESS_THAN
public DurationFilter(int contentRule, java.lang.Long duration)
contentRule
- One of two content rules determining allowed value of task duration.duration
- Time duration in millisecondss that must be greater/smaller than task duration.public DurationFilter()
public java.util.Vector getContentRules()
getContentRules
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