Class MorePaths

java.lang.Object
com.sk89q.worldedit.util.io.file.MorePaths

public class MorePaths extends Object
  • Method Details

    • oldestFirst

      public static Comparator<Path> oldestFirst()
    • newestFirst

      public static Comparator<Path> newestFirst()
    • iterPaths

      public static Stream<Path> iterPaths(Path path)
      Starting with the first path element, add elements until reaching this path.
    • optimizedSpliterator

      public static Spliterator<Path> optimizedSpliterator(Path path)
      Create an efficiently-splittable spliterator for the given path elements.

      Since paths are so small, this is only useful for preventing heavy computations on later parts of the stream from occurring when using Streams.findLast(IntStream), and not for parallelism.

      Parameters:
      path - the path to create a spliterator for
      Returns:
      the spliterator