Skip to content

Commit

Permalink
Merge pull request #3423 from stealthcode/rename-extend
Browse files Browse the repository at this point in the history
Renaming Observable#x to Observable#extend
  • Loading branch information
Aaron Tull committed Oct 8, 2015
2 parents 07f7560 + 30df85b commit 9204154
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public interface Operator<R, T> extends Func1<Subscriber<? super R>, Subscriber<
* @since (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
*/
@Experimental
public <R> R x(Func1<? super OnSubscribe<T>, ? extends R> conversion) {
public <R> R extend(Func1<? super OnSubscribe<T>, ? extends R> conversion) {
return conversion.call(new OnSubscribe<T>() {
@Override
public void call(Subscriber<? super T> subscriber) {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/rx/ObservableConversionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void onNext(String t) {
}});
List<Object> crewOfBattlestarGalactica = Arrays.asList(new Object[] {"William Adama", "Laura Roslin", "Lee Adama", new Cylon()});
Observable.from(crewOfBattlestarGalactica)
.x(new ConvertToCylonDetector<Object>())
.extend(new ConvertToCylonDetector<Object>())
.beep(new Func1<Object, Boolean>(){
@Override
public Boolean call(Object t) {
Expand Down Expand Up @@ -199,7 +199,7 @@ public Integer call(Integer k) {
return i + k;
}});
}})
.x(new Func1<OnSubscribe<Integer>, ConcurrentLinkedQueue<Integer>>() {
.extend(new Func1<OnSubscribe<Integer>, ConcurrentLinkedQueue<Integer>>() {
@Override
public ConcurrentLinkedQueue<Integer> call(OnSubscribe<Integer> onSubscribe) {
final ConcurrentLinkedQueue<Integer> q = new ConcurrentLinkedQueue<Integer>();
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/rx/ObservableTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ public void testForEachWithNull() {
public void testExtend() {
final TestSubscriber<Object> subscriber = new TestSubscriber<Object>();
final Object value = new Object();
Observable.just(value).x(new Func1<OnSubscribe<Object>,Object>(){
Observable.just(value).extend(new Func1<OnSubscribe<Object>,Object>(){
@Override
public Object call(OnSubscribe<Object> onSubscribe) {
onSubscribe.call(subscriber);
Expand Down

0 comments on commit 9204154

Please sign in to comment.