MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / iterMotion

Method iterMotion

collectiontopics/ListOps.java:48–56  ·  view source on GitHub ↗
(List<String> a)

Source from the content-addressed store, hash-verified

46 a.clear(); // Remove all elements
47 }
48 public static void iterMotion(List<String> a) {
49 ListIterator<String> it = a.listIterator();
50 b = it.hasNext();
51 b = it.hasPrevious();
52 s = it.next();
53 i = it.nextIndex();
54 s = it.previous();
55 i = it.previousIndex();
56 }
57 public static void iterManipulation(List<String> a) {
58 ListIterator<String> it = a.listIterator();
59 it.add("47");

Callers 1

mainMethod · 0.95

Calls 2

nextMethod · 0.65
hasNextMethod · 0.45

Tested by

no test coverage detected