Skip to content
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

Implement 'toString' method for some Emitters #5995

Merged
merged 7 commits into from
May 6, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ public boolean isCancelled() {
public FlowableEmitter<T> serialize() {
return this;
}

@Override
public String toString() {
return emitter.toString();
}
}

abstract static class BaseEmitter<T>
Expand Down Expand Up @@ -338,6 +343,11 @@ public final long requested() {
public final FlowableEmitter<T> serialize() {
return new SerializedEmitter<T>(this);
}

@Override
public String toString() {
return String.format("%s{%s}", getClass().getSimpleName(), super.toString());
}
}

static final class MissingEmitter<T> extends BaseEmitter<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ public void dispose() {
public boolean isDisposed() {
return DisposableHelper.isDisposed(get());
}

@Override
public String toString() {
return String.format("%s{%s}", getClass().getSimpleName(), super.toString());
}
}

/**
Expand Down Expand Up @@ -279,6 +284,11 @@ public boolean isDisposed() {
public ObservableEmitter<T> serialize() {
return this;
}

@Override
public String toString() {
return emitter.toString();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,10 @@ public void dispose() {
public boolean isDisposed() {
return DisposableHelper.isDisposed(get());
}

@Override
public String toString() {
return String.format("%s{%s}", getClass().getSimpleName(), super.toString());
}
}
}