Home | History | Annotate | Download | only in collect

Lines Matching refs:key

41   void assertModelAgrees(List<Integer> list, Integer key, int answer,
45 if (list.contains(key)) {
46 assertEquals(list.indexOf(key), answer);
51 if (list.contains(key)) {
52 assertEquals(list.lastIndexOf(key), answer);
57 if (list.contains(key)) {
58 assertEquals(key, list.get(answer));
63 if (list.contains(key)) {
64 assertEquals(list.lastIndexOf(key) + 1, answer);
69 if (list.contains(key)) {
70 assertEquals(list.indexOf(key) - 1, answer);
77 // key is not present
79 for (int i = list.size() - 1; i >= 0 && list.get(i) > key; i--) {
100 for (int key = 0; key <= 10; key++) {
101 assertModelAgrees(LIST_WITHOUT_DUPS, key,
102 SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior),
112 for (int key = 0; key <= 10; key++) {
113 assertModelAgrees(LIST_WITH_DUPS, key,
114 SortedLists.binarySearch(LIST_WITH_DUPS, key, presentBehavior, absentBehavior),