|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.war.util.PathSet
public class PathSet
Set of file's paths.
The class extends functionality of a "normal" set of strings by a process of the paths normalization. All paths are converted to unix form (slashes) and they don't start with starting /.
| Constructor Summary | |
|---|---|
PathSet()
Creates an empty paths set |
|
PathSet(Collection<String> paths)
Creates paths set and normalizate and adds all 'paths'. |
|
PathSet(String[] paths)
Creates paths set and normalizate and adds all 'paths'. |
|
| Method Summary | |
|---|---|
void |
add(String path)
Normalizes and adds given path to the set. |
void |
addAll(Collection<String> paths)
Normalizes and adds given paths (collection of strings) to the set. |
void |
addAll(Collection<String> paths,
String prefix)
Normalizes and adds given paths (collection of strings) to the set. |
void |
addAll(PathSet paths)
Adds given paths to the set. |
void |
addAll(PathSet paths,
String prefix)
Adds given paths to the set. |
void |
addAll(String[] paths)
Normalizes and adds given paths to the set. |
void |
addAll(String[] paths,
String prefix)
Normalizes and adds given paths to the set. |
void |
addAllFilesInDirectory(File directory,
String prefix)
Adds to the set all files in the given directory |
void |
addPrefix(String prefix)
Adds given prefix to all paths in the set. |
boolean |
contains(String path)
Checks if the set constains given path. |
Iterator<String> |
iterator()
Returns iterator of normalized paths (strings) |
protected String |
normalizeFilePath(String path)
The method normalizes the path. |
static String |
normalizeFilePathStatic(String path)
The method normalizes the path. |
Collection<String> |
paths()
|
int |
size()
Returns count of the paths in the set |
static String |
trimTrailingSlashes(String str)
The method deletes all trailing slashes from the given string |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PathSet()
public PathSet(Collection<String> paths)
paths - to be addedpublic PathSet(String[] paths)
paths - to be added| Method Detail |
|---|
protected String normalizeFilePath(String path)
path - to normalization
public void add(String path)
path - to be added
public void addAll(Collection<String> paths,
String prefix)
paths - - collection of strings to be addedprefix - added to all given paths
public void addAll(String[] paths,
String prefix)
paths - to be addedprefix - added to all given paths
public void addAll(PathSet paths,
String prefix)
paths - to be addedprefix - added to all given pathspublic void addAll(Collection<String> paths)
paths - - collection of strings to be addedpublic void addAll(String[] paths)
paths - to be addedpublic void addAll(PathSet paths)
paths - to be addedpublic boolean contains(String path)
path - we are looking for in the set.
public Iterator<String> iterator()
iterator in interface Iterable<String>public Collection<String> paths()
public void addPrefix(String prefix)
prefix - to be added to all itemspublic int size()
public void addAllFilesInDirectory(File directory,
String prefix)
directory - that will be searched for file's paths to addprefix - to be added to all found filespublic static String normalizeFilePathStatic(String path)
path - to normalization
public static String trimTrailingSlashes(String str)
str - a string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||