Class PathSet
java.lang.Object
org.apache.maven.plugins.war.util.PathSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidNormalizes and adds given path to the set.voidNormalizes and adds given paths to the set.voidNormalizes and adds given paths to the set.voidaddAll(Collection<String> paths) Normalizes and adds given paths (collection of strings) to the set.voidaddAll(Collection<String> paths, String prefix) Normalizes and adds given paths (collection of strings) to the set.voidAdds given paths to the set.voidAdds given paths to the set.voidaddAllFilesInDirectory(File directory, String prefix) Adds to the set all files in the given directory.voidAdds given prefix to all paths in the set.booleanChecks if the set constains given path.iterator()Returns iterator of normalized paths (strings)paths()intsize()Returns count of the paths in the set.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
PathSet
public PathSet()Creates an empty paths set. -
PathSet
Creates paths set and normalizate and adds all 'paths'. The source 'paths' will not be changed.- Parameters:
paths- to be added
-
PathSet
Creates paths set and normalizate and adds all 'paths'. The source 'paths' will not be changed.- Parameters:
paths- to be added
-
-
Method Details
-
add
Normalizes and adds given path to the set.- Parameters:
path- to be added
-
addAll
Normalizes and adds given paths (collection of strings) to the set. The source collection will not be changed.- Parameters:
paths- collection of strings to be addedprefix- added to all given paths
-
addAll
-
addAll
-
addAll
Normalizes and adds given paths (collection of strings) to the set. The source collection will not be changed.- Parameters:
paths- collection of strings to be added
-
addAll
Normalizes and adds given paths to the set. The source collection will not be changed.- Parameters:
paths- to be added
-
addAll
Adds given paths to the set. The source collection will not be changed.- Parameters:
paths- to be added
-
contains
Checks if the set constains given path. The path is normalized before check.- Parameters:
path- we are looking for in the set- Returns:
- information if the set constains the path
-
iterator
-
paths
- Returns:
pathsSet
-
addPrefix
Adds given prefix to all paths in the set. The prefix should be ended by '/'. The generated paths are normalized.- Parameters:
prefix- to be added to all items
-
size
public int size()Returns count of the paths in the set.- Returns:
- count of the paths in the set
-
addAllFilesInDirectory
-