java.lang.Object
com.jackmeng.halcyoninae.halcyon.utils.Wrapper

public final class Wrapper extends Object
This class provides a globalized way for certain tasks to be executed without making the code too complex.
Author:
Jack Meng, 3.1
  • Constructor Details

    • Wrapper

      public Wrapper()
  • Method Details

    • async

      public static void async(Runnable runnable)
      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

      public static void sort(TabTree tree)
      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

      public static void threadedRun(Runnable run)
      Uses an ExecutorService managed Threadpool to run a particular task. See the documentation of async(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