public class FastPaths extends Object
We use FastPaths for this instead of putting it in MorePaths to give a hint to the reader about why we aren't just doing seemingly simple things ourselves.
Constructor and Description |
---|
FastPaths() |
Modifier and Type | Method and Description |
---|---|
static String |
getNameString(Path path,
int index)
Gets a Path segment as a String.
|
static com.google.common.hash.Hasher |
hashPathFast(com.google.common.hash.Hasher hasher,
Path path)
Adds the Path to the hasher as unencoded chars.
|
public static String getNameString(Path path, int index)
path.getName(index).toString()
.public static com.google.common.hash.Hasher hashPathFast(com.google.common.hash.Hasher hasher, Path path)
hasher.putUnencodedChars(path.toString())
.