Class Wrapper
java.lang.Object
com.jackmeng.halcyoninae.halcyon.utils.Wrapper
This class provides a globalized way
for certain tasks to be executed
without making the code too complex.
- Author:
- Jack Meng, 3.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Launches a runnable in an async pool.static void
Attempts to sort a standard TabTree implementation.static void
threadedRun
(Runnable run) Uses an ExecutorService managed Threadpool to run a particular task.
-
Constructor Details
-
Wrapper
public Wrapper()
-
-
Method Details
-
async
Launches a runnable in an async pool.This method should only be used for non-infinite runnables, and should only be used for one time or simple loops.
If a complex task is needed, especially with GUI, a Job implementation should be used.
- Parameters:
runnable
- The runnable to be launched- Since:
- 3.1
- See Also:
-
sort
Attempts to sort a standard TabTree implementation. A TabTree is a master interface that holds information regarding a single GUI playlist.- Parameters:
tree
- A TabTree implementation with valid File listings.- Since:
- 3.3
- See Also:
-
threadedRun
Uses an ExecutorService managed Threadpool to run a particular task. See the documentation ofasync(Runnable)
for the exact documentations as the overall usage are the same.- Parameters:
run
- A runnable or an anonymous class can be used for this implementation- Since:
- 3.2
-