MCPcopy Create free account
hub / github.com/ReadyTalk/avian / find

Method find

classpath/java/util/LinkedList.java:24–33  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

22 public LinkedList() { }
23
24 private Cell<T> find(int index) {
25 int i = 0;
26 for (Cell<T> c = front; c != null; c = c.next) {
27 if (i == index) {
28 return c;
29 }
30 ++ i;
31 }
32 throw new IndexOutOfBoundsException(index + " not in [0, " + size + ")");
33 }
34
35 private static boolean equal(Object a, Object b) {
36 return (a == null && b == null) || (a != null && a.equals(b));

Callers 5

containsMethod · 0.95
addMethod · 0.95
getMethod · 0.95
setMethod · 0.95
removeMethod · 0.95

Calls 1

equalMethod · 0.95

Tested by

no test coverage detected