public final class JkPathSequence
extends java.lang.Object
implements java.lang.Iterable<java.nio.file.Path>
entry
.Modifier and Type | Method and Description |
---|---|
JkPathSequence |
and(java.lang.Iterable<java.nio.file.Path> otherEntries)
Returns a
JkPathSequence made of, in the order, the entries of this
one plus the specified ones. |
JkPathSequence |
and(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... others) |
JkPathSequence |
andPrepending(java.lang.Iterable<java.nio.file.Path> paths)
Returns a
JkPathSequence made of the specified entries followed by the sequence entries of this object. |
JkPathSequence |
andPrepending(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... entries) |
boolean |
equals(java.lang.Object o) |
java.util.List<java.nio.file.Path> |
getEntries()
Returns this sequence as a list.
|
int |
hashCode() |
java.util.Iterator<java.nio.file.Path> |
iterator() |
static JkPathSequence |
of() |
static JkPathSequence |
of(java.lang.Iterable<java.nio.file.Path> paths)
Creates a
JkPathSequence from an Iterable of paths or a single Path. |
static JkPathSequence |
of(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... others)
Creates a
JkPathSequence form specified entries |
static JkPathSequence |
of(java.nio.file.Path baseDir,
java.lang.String relativePathsAsString)
Creates a
JkPathSequence from a base directory and string of
relative paths separated with a ";". |
JkPathSequence |
resolveTo(java.nio.file.Path baseDir)
Returns an identical path sequence but replacing relative paths with absolute paths resolved from the
specified base directory.
|
java.lang.String |
toString()
Returns the file names concatenated with ';'.
|
JkPathSequence |
withoutDuplicates()
Returns a
JkPathSequence identical to this one but without duplicates. |
public static JkPathSequence of(java.lang.Iterable<java.nio.file.Path> paths)
JkPathSequence
from an Iterable
of paths or a single Path.paths
- As Path
class implements Iterable
the argument can be a single Path
instance, if so it will be interpreted as a list containing a single element which is this argument.public static JkPathSequence of()
public static JkPathSequence of(java.nio.file.Path baseDir, java.lang.String relativePathsAsString)
JkPathSequence
from a base directory and string of
relative paths separated with a ";".public static JkPathSequence of(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... others)
JkPathSequence
form specified entriespublic JkPathSequence withoutDuplicates()
JkPathSequence
identical to this one but without duplicates.
If a given file in this sequence exist twice or more, then only the first occurrence is kept in the returned
sequence.public java.util.List<java.nio.file.Path> getEntries()
public java.util.Iterator<java.nio.file.Path> iterator()
iterator
in interface java.lang.Iterable<java.nio.file.Path>
public JkPathSequence andPrepending(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... entries)
andPrepending(Iterable)
public JkPathSequence andPrepending(java.lang.Iterable<java.nio.file.Path> paths)
JkPathSequence
made of the specified entries followed by the sequence entries of this object.paths
- As Path
class implements Iterable
the argument can be a single Path
instance, if so it will be interpreted as a list containing a single element which is this argument.public JkPathSequence and(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... others)
and(Iterable)
public JkPathSequence and(java.lang.Iterable<java.nio.file.Path> otherEntries)
JkPathSequence
made of, in the order, the entries of this
one plus the specified ones.public JkPathSequence resolveTo(java.nio.file.Path baseDir)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object