-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
334 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ain/java/com/flash3388/flashlib/scheduling/impl/triggers/TriggerActionControllerImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.flash3388.flashlib.scheduling.impl.triggers; | ||
|
||
import com.flash3388.flashlib.scheduling.actions.Action; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class TriggerActionControllerImpl implements TriggerActionController { | ||
|
||
private final List<Action> mActionsToStartIfRunning; | ||
private final List<Action> mActionsToStopIfRunning; | ||
private final List<Action> mActionsToToggle; | ||
|
||
public TriggerActionControllerImpl() { | ||
mActionsToStartIfRunning = new ArrayList<>(2); | ||
mActionsToStopIfRunning = new ArrayList<>(2); | ||
mActionsToToggle = new ArrayList<>(2); | ||
} | ||
|
||
public List<Action> getActionsToStartIfRunning() { | ||
return mActionsToStartIfRunning; | ||
} | ||
|
||
public List<Action> getActionsToStopIfRunning() { | ||
return mActionsToStopIfRunning; | ||
} | ||
|
||
public List<Action> getActionsToToggle() { | ||
return mActionsToToggle; | ||
} | ||
|
||
@Override | ||
public void addActionToStartIfRunning(Action action) { | ||
mActionsToStartIfRunning.add(action); | ||
} | ||
|
||
@Override | ||
public void addActionToStopIfRunning(Action action) { | ||
mActionsToStopIfRunning.add(action); | ||
} | ||
|
||
@Override | ||
public void addActionToToggle(Action action) { | ||
mActionsToToggle.add(action); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.