Closed GoogleCodeExporter closed 9 years ago
Note that we have methods that could be turned into what you want by adding
javadoc, precondition checks, unit tests, etc.
136: public static int indexOf(int[] array, int target) {
137: return indexOf(array, target, 0, array.length);
138: }
139:
140: // TODO: consider making this public
141: private static int indexOf(
142: int[] array, int target, int start, int end) {
143: for (int i = start; i < end; i++) {
144: if (array[i] == target) {
145: return i;
146: }
147: }
148: return -1;
149: }
Original comment by kevinb@google.com
on 12 Jan 2011 at 10:55
Original comment by kevinb@google.com
on 13 Jul 2011 at 6:18
Actually, +1 on this change.
Original comment by wasserman.louis
on 16 Oct 2011 at 11:02
Original comment by fry@google.com
on 10 Dec 2011 at 3:55
Original comment by fry@google.com
on 16 Feb 2012 at 7:17
Original comment by kevinb@google.com
on 30 May 2012 at 7:43
Original comment by kevinb@google.com
on 22 Jun 2012 at 6:16
Issue 1504 has been merged into this issue.
Original comment by lowas...@google.com
on 25 Sep 2013 at 9:56
Any idea when these methods can be made public as they already exist?
Original comment by ogregoire
on 16 Oct 2014 at 12:26
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
stevenro...@gmail.com
on 18 Nov 2010 at 6:06