MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / getUrl

Method getUrl

src/main/java/org/htmlunit/History.java:176–181  ·  view source on GitHub ↗

Returns the URL at the specified index in the navigation history, or null if the index is not valid. @param index the index of the URL to be returned @return the URL at the specified index in the navigation history, or null if the index is not valid

(final int index)

Source from the content-addressed store, hash-verified

174 * @return the URL at the specified index in the navigation history, or {@code null} if the index is not valid
175 */
176 public URL getUrl(final int index) {
177 if (index >= 0 && index < entries_.size()) {
178 return UrlUtils.toUrlSafe(entries_.get(index).getUrl().toExternalForm());
179 }
180 return null;
181 }
182
183 /**
184 * Goes back one step in the navigation history, if possible.

Callers 2

historyMethod · 0.95
initializeMethod · 0.95

Calls 4

toUrlSafeMethod · 0.95
getUrlMethod · 0.65
sizeMethod · 0.45
getMethod · 0.45

Tested by 1

historyMethod · 0.76