public class MorePaths
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.stream.Stream<java.nio.file.Path> |
iterPaths(java.nio.file.Path path)
Starting with the first path element, add elements until reaching this path.
|
static java.util.Comparator<java.nio.file.Path> |
newestFirst() |
static java.util.Comparator<java.nio.file.Path> |
oldestFirst() |
static java.util.Spliterator<java.nio.file.Path> |
optimizedSpliterator(java.nio.file.Path path)
Create an efficiently-splittable spliterator for the given path elements.
|
public static java.util.Comparator<java.nio.file.Path> oldestFirst()
public static java.util.Comparator<java.nio.file.Path> newestFirst()
public static java.util.stream.Stream<java.nio.file.Path> iterPaths(java.nio.file.Path path)
public static java.util.Spliterator<java.nio.file.Path> optimizedSpliterator(java.nio.file.Path path)
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.
path
- the path to create a spliterator for