MCPcopy Create free account
hub / github.com/antlr/codebuff / lastIndexOfRandomAccess

Method lastIndexOfRandomAccess

output/java_guava/1.4.18/Lists.java:1126–1141  ·  view source on GitHub ↗
(List<?> list, @Nullable Object element)

Source from the content-addressed store, hash-verified

1124 }
1125
1126 private static int lastIndexOfRandomAccess(List<?> list, @Nullable Object element) {
1127 if (element == null) {
1128 for (int i = list.size() - 1; i >= 0; i--) {
1129 if (list.get(i) == null) {
1130 return i;
1131 }
1132 }
1133 } else {
1134 for (int i = list.size() - 1; i >= 0; i--) {
1135 if (element.equals(list.get(i))) {
1136 return i;
1137 }
1138 }
1139 }
1140 return -1;
1141 }
1142
1143 /**
1144 * Returns an implementation of {@link List#listIterator(int)}.

Callers 1

lastIndexOfImplMethod · 0.95

Calls 3

sizeMethod · 0.65
getMethod · 0.65
equalsMethod · 0.65

Tested by

no test coverage detected