-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Seq.indexOf method(s) #242
Comments
Excellent idea. I agree with both proposed APIs: OptionalLong indexOf(T item)
OptionalLong indexOf(Predicate<? super T> predicate) The latter is also not unexpected, given the existing Would you be interested in providing a pull request for this? |
I have such methods returning |
I am also in favor of OK, I'll create a pull request for this over the weekend. I propose an implementation utilizing |
Excellent, looking forward! |
Implementation in #243 |
Since we have
Seq.contains
andSeq.get(index)
, it'd be nice to also havelong indexOf(T item)
orOptionalLong indexOf(T item)
.Incidentally, we could also have
long/OptionalLong indexOf(Predicate<? super T> predicate)
which would be equivalent to Guava'sIterators.indexOf
.The text was updated successfully, but these errors were encountered: