forked from jens/Automation
Calendar trigger
This commit is contained in:
@ -839,4 +839,30 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getAmountOfTriggersForType(Trigger.Trigger_Enum type)
|
||||
{
|
||||
int amount = 0;
|
||||
|
||||
for(Trigger t : getTriggerSet())
|
||||
{
|
||||
if(t.getTriggerType().equals(type))
|
||||
amount++;
|
||||
}
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
public int getAmountOfActionsForType(Action.Action_Enum type)
|
||||
{
|
||||
int amount = 0;
|
||||
|
||||
for(Action a : getActionSet())
|
||||
{
|
||||
if(a.getAction().equals(type))
|
||||
amount++;
|
||||
}
|
||||
|
||||
return amount;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user