Implemented the 'cast' and 'ofType' operators#403
Merged
benjchristensen merged 6 commits intoReactiveX:masterfrom Sep 25, 2013
Merged
Implemented the 'cast' and 'ofType' operators#403benjchristensen merged 6 commits intoReactiveX:masterfrom
benjchristensen merged 6 commits intoReactiveX:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
I think this signature should be Observable<R> cast(Class<R> klass). Then you can use klass.cast(t) and won't need to suppress unchecked warnings. Also, it will mean that a ClassCastException will be generated here rather than at some random place downstream.
My signature will need to be adjusted by the co/contra-variance police, of course :)
Contributor
|
Also, this needs a unit test. Thanks for contributing! |
|
RxJava-pull-requests #303 ABORTED |
Member
Author
|
Thanks. I added the klass parameter and unit tests. |
|
RxJava-pull-requests #304 ABORTED |
|
RxJava-pull-requests #305 ABORTED |
|
RxJava-pull-requests #306 ABORTED |
|
RxJava-pull-requests #307 ABORTED |
|
RxJava-pull-requests #308 ABORTED |
Member
benjchristensen
added a commit
that referenced
this pull request
Sep 25, 2013
Implemented the 'cast' and 'ofType' operators
rickbw
pushed a commit
to rickbw/RxJava
that referenced
this pull request
Jan 9, 2014
Implemented the 'cast' and 'ofType' operators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I used 'map' to implement the 'cast' operator #26. I also used 'cast' to implement the 'ofType' operator #67.
Please take a look. Thanks!