MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / go

Method go

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

Goes forward or backwards in the navigation history, according to whether the specified relative index is positive or negative. If the specified index is 0 , this method reloads the current page. @param relativeIndex the index to move to, relative to the current index @return this naviga

(final int relativeIndex)

Source from the content-addressed store, hash-verified

214 * @throws IOException in case of error
215 */
216 public History go(final int relativeIndex) throws IOException {
217 final int i = index_ + relativeIndex;
218 if (i < entries_.size() && i >= 0) {
219 index_ = i;
220 goToUrlAtCurrentIndex();
221 }
222 return this;
223 }
224
225 /**
226 * {@inheritDoc}

Callers

nothing calls this directly

Calls 2

goToUrlAtCurrentIndexMethod · 0.95
sizeMethod · 0.45

Tested by

no test coverage detected