Refactor
This commit is contained in:
parent
8214c8dd97
commit
4ff0768fea
|
@ -3,9 +3,9 @@ package com.baelding.rxjava.operator;
|
|||
import rx.Observable.Operator;
|
||||
import rx.Subscriber;
|
||||
|
||||
public class cleanString implements Operator<String, String> {
|
||||
public class CleanString implements Operator<String, String> {
|
||||
|
||||
public cleanString() {
|
||||
public CleanString() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -4,8 +4,8 @@ import rx.Observable;
|
|||
import rx.Observable.Transformer;
|
||||
import rx.functions.Func1;
|
||||
|
||||
public class toLength implements Transformer<String, Integer> {
|
||||
public toLength() {
|
||||
public class ToLength implements Transformer<String, Integer> {
|
||||
public ToLength() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -15,10 +15,9 @@ import rx.Observable;
|
|||
import rx.Observable.Operator;
|
||||
import rx.Observable.Transformer;
|
||||
import rx.Subscriber;
|
||||
import rx.functions.Func1;
|
||||
|
||||
import com.baelding.rxjava.operator.cleanString;
|
||||
import com.baelding.rxjava.operator.toLength;
|
||||
import com.baelding.rxjava.operator.CleanString;
|
||||
import com.baelding.rxjava.operator.ToLength;
|
||||
|
||||
public class RxJavaCustomOperatorUnitTest {
|
||||
|
||||
|
@ -28,7 +27,7 @@ public class RxJavaCustomOperatorUnitTest {
|
|||
final List<String> results = new ArrayList<String>();
|
||||
|
||||
final Observable<String> observable = Observable.from(list)
|
||||
.lift(new cleanString());
|
||||
.lift(new CleanString());
|
||||
|
||||
// when
|
||||
observable.subscribe(results::add);
|
||||
|
@ -45,7 +44,7 @@ public class RxJavaCustomOperatorUnitTest {
|
|||
final List<Integer> results = new ArrayList<Integer>();
|
||||
|
||||
final Observable<Integer> observable = Observable.from(list)
|
||||
.compose(new toLength());
|
||||
.compose(new ToLength());
|
||||
|
||||
// when
|
||||
observable.subscribe(results::add);
|
||||
|
|
Loading…
Reference in New Issue