public class Only
An easy way of running tasks a specific amount of times throughout the lifespan of an app, either between versions of itself or regardless of the same.
Modifier and Type | Class and Description |
---|---|
static class |
Only.Builder |
Modifier and Type | Field and Description |
---|---|
static Only |
INSTANCE
An easy way of running tasks a specific amount of times throughout the lifespan of an app,
either between versions of itself or regardless of the same.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAllTasks()
Clear the amount of times for all tasks.
|
void |
clearTask(java.lang.String taskName)
Clear the amount of times a specific task has been run.
|
int |
getTaskTimes(java.lang.String taskName)
Gets the amount of times a specific task has been run.
|
java.lang.String |
getTaskVersion(java.lang.String taskName)
Gets the version of a specific task if any
|
void |
init(android.content.Context context)
initialize
class Only |
void |
init(android.content.Context context,
java.lang.String version)
initialize
class Only , providing a specific version for the tasks. |
boolean |
isDebugModeEnabled()
Checks if
class Only is in debug mode. |
Only |
setDebugMode(boolean debug)
Sets if
class Only should be in debug mode. |
void |
setTaskTimes(java.lang.String taskName,
int time)
Sets the amount of times a specific task has been run.
|
public static Only INSTANCE
An easy way of running tasks a specific amount of times throughout the lifespan of an app, either between versions of itself or regardless of the same.
public void init(android.content.Context context)
initialize class Only
class Only
public void init(android.content.Context context, java.lang.String version)
initialize class Only
, providing a specific version for the tasks.
class Only
public Only setDebugMode(boolean debug)
Sets if class Only
should be in debug mode.
class Only
public boolean isDebugModeEnabled()
Checks if class Only
is in debug mode.
class Only
public int getTaskTimes(java.lang.String taskName)
Gets the amount of times a specific task has been run.
public void setTaskTimes(java.lang.String taskName, int time)
Sets the amount of times a specific task has been run.
public java.lang.String getTaskVersion(java.lang.String taskName)
Gets the version of a specific task if any
public void clearTask(java.lang.String taskName)
Clear the amount of times a specific task has been run.
public void clearAllTasks()
Clear the amount of times for all tasks.