Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Implemented the 'elementAt' and 'elementAtOrDefault' operators. see #41#390

Merged
benjchristensen merged 1 commit intoReactiveX:masterfrom
zsxwing:element_at
Sep 21, 2013
Merged

Implemented the 'elementAt' and 'elementAtOrDefault' operators. see #41#390
benjchristensen merged 1 commit intoReactiveX:masterfrom
zsxwing:element_at

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Sep 18, 2013

Hi,

This implements the ElementAt and ElementAtOrDefault operators from #41.

For ElementAt, if the index is less than 0, or greater than or equal to the number of elements in the source sequence, an IndexOutOfBoundsException will be threw.

For ElementAtOrDefault, if the index is less than 0, an IndexOutOfBoundsException will be threw. What's more, I added a defaultValue parameter. I can not get the element type in the source observable due to type erasure. So I can not determine the default value automatically. That's why ElementAtOrDefault needs a defaultValue parameter.

@cloudbees-pull-request-builder

RxJava-pull-requests #288 SUCCESS
This pull request looks good

benjchristensen added a commit that referenced this pull request Sep 21, 2013
@benjchristensen benjchristensen merged commit 5df8e3c into ReactiveX:master Sep 21, 2013
@benjchristensen
Copy link
Member

Thank you @zsxwing

@zsxwing zsxwing deleted the element_at branch September 23, 2013 11:14
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
* retry reactor ReactiveX#383

* retry reactor ReactiveX#383

* review comments

* javadoc update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants