Rogan Creswick
unread,Nov 5, 2009, 2:19:09 PM11/5/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Kevin Bourrillion, Jared Levy, Johan Van den Neste, Ben Darfler, Google Collections Library - users list
On Thu, Nov 5, 2009 at 9:52 AM, Kevin Bourrillion <
kev...@google.com> wrote:
> That's what I meant, just didn't want to spend though on what's the best
> name yet. Maybe indexOfFirstMatch(), or maybe indexOf() is fine. Not sure
> the lastIndexOf() version is needed as much.
Just tossing this out because it came to mind:
Iterator<Integer> Lists.indexes(List, Predicate)
The other variations can be implemented on top of that, it
encapsulates the common (in my experience) loop over all indices, and
it can be implemented lazily.
I don't think I feel strongly about the name ;) but returning an
Iterator would be more useful to me than returning atomic values.
--Rogan