public class PathSet extends Object implements Iterable<String>
| Constructor and Description |
|---|
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'.
|
| Modifier and Type | Method and Description |
|---|---|
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)
|
Collection<String> |
paths() |
int |
size()
Returns count of the paths in the set
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic PathSet()
public PathSet(Collection<String> paths)
paths - to be addedpublic PathSet(String[] paths)
paths - to be addedpublic void add(String path)
path - to be addedpublic void addAll(Collection<String> paths, String prefix)
paths - - collection of strings to be addedprefix - added to all given pathspublic void addAll(String[] paths, String prefix)
paths - to be addedprefix - added to all given pathspublic 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 Collection<String> paths()
pathsSetpublic void addPrefix(String prefix)
prefix - to be added to all itemspublic int size()
Copyright © 2002–2019 The Apache Software Foundation. All rights reserved.