Class Util

java.lang.Object
xyz.jpenilla.gremlin.runtime.util.Util

@NullMarked public class Util extends Object
  • Method Details

    • shutdownExecutor

      public static void shutdownExecutor(ExecutorService service, TimeUnit timeoutUnit, long timeoutLength)
    • mkParentDirs

      public static Path mkParentDirs(Path path) throws IOException
      Attempts to create the parent directories of path if necessary.

      Returns path when successful.

      Parameters:
      path - path
      Returns:
      path
      Throws:
      IOException - on I/O error
    • rethrow

      public static <X extends Throwable> RuntimeException rethrow(Throwable t) throws X
      Throws:
      X extends Throwable
    • classpathUrl

      public static URL classpathUrl(Class<?> cls)
    • sorted

      public static <T extends Comparable<T>> List<T> sorted(Collection<T> list)