Class URLCollection
- java.lang.Object
-
- org.apache.jmeter.protocol.http.parser.URLCollection
-
public class URLCollection extends Object
Collection class designed for handling URLsBefore a URL is added to the collection, it is wrapped in a URLString class. The iterator unwraps the URL before return.
N.B. Designed for use by HTMLParser, so is not a full implementation - e.g. does not support remove()
-
-
Constructor Summary
Constructors Constructor Description URLCollection(Collection<URLString> c)
Creates a new URLCollection from an existing Collection
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(URL u)
Adds the URL to the Collection, first wrapping it in the URLString classboolean
addURL(String url, URL baseUrl)
Convenience method for adding URLs to the collection.Iterator<URL>
iterator()
-
-
-
Constructor Detail
-
URLCollection
public URLCollection(Collection<URLString> c)
Creates a new URLCollection from an existing Collection- Parameters:
c
- collection to start with
-
-
Method Detail
-
add
public boolean add(URL u)
Adds the URL to the Collection, first wrapping it in the URLString class- Parameters:
u
- URL to add- Returns:
- boolean condition returned by the add() method of the underlying collection
-
addURL
public boolean addURL(String url, URL baseUrl)
Convenience method for adding URLs to the collection. If the url parameter isnull
, empty or URL is malformed, nothing is done- Parameters:
url
- String, may be null or emptybaseUrl
- base forurl
to add information, which might be missing inurl
- Returns:
- boolean condition returned by the add() method of the underlying collection
-
-