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

Method indexOf

src/main/java/org/htmlunit/html/HtmlSelect.java:710–723  ·  view source on GitHub ↗

INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. @param option the option to search for @return the index of the provided option or zero if not found

(final HtmlOption option)

Source from the content-addressed store, hash-verified

708 * @return the index of the provided option or zero if not found
709 */
710 public int indexOf(final HtmlOption option) {
711 if (option == null) {
712 return 0;
713 }
714
715 int index = 0;
716 for (final HtmlElement element : getHtmlElementDescendants()) {
717 if (option == element) {
718 return index;
719 }
720 index++;
721 }
722 return 0;
723 }
724
725 /**
726 * {@inheritDoc}

Callers 15

getIndexMethod · 0.95
fetch.umd.jsFile · 0.45
BodyFunction · 0.45
normalizeMethodFunction · 0.45
parseMultipartFunction · 0.45
parseHeadersFunction · 0.45
fetchFunction · 0.45
getContentTypeMethod · 0.45
parseMethod · 0.45
setUrlMethod · 0.45

Calls 1

Tested by

no test coverage detected