public class URLCollection extends Object
Before 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 and Description |
|---|
URLCollection(Collection<URLString> c)
Creates a new URLCollection from an existing Collection
|
public URLCollection(Collection<URLString> c)
c - collection to start withpublic boolean add(URL u)
u - URL to addpublic boolean addURL(String url, URL baseUrl)
null, empty or URL is malformed, nothing is
doneurl - String, may be null or emptybaseUrl - base for url to add information, which might be
missing in urlCopyright © 1998-2016 Apache Software Foundation. All Rights Reserved.