title: Transforming the value of a ReplaySubject
body: <p>Clever Java people! I'm slow and stuck this morning and I hope that you can help. (I'm not new to streams and programming, but very new to Java and Rx)</p>
  
  <p>Essentially, I have a simple object, Credentials, with a userName property. I receive this as a ReplaySubject and I want to convert that to a ReplaySubject instead. I.e. basically just transform the ReplaySubject to a ReplaySubject. This is code that expresses what I want, but it errors with type error that overwhelms to poor cognitive functions that are not yet used to Java.</p>
  
  <pre><code> public ReplaySubject&lt;String&gt; getUserId() {
     return getCredentials(context).map(credentials -&gt; credentials.userName);
   }
  
   private ReplaySubject&lt;Credentials&gt; getCredentials() {
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Error:(52, 43) error: incompatible types: no instance(s) of type variable(s) R exist so that Observable&lt;R&gt; conforms to ReplaySubject&lt;String&gt;
  where R,T are type-variables:
  R extends Object declared in method &lt;R&gt;map(Func1&lt;? super T,? extends R&gt;)
  T extends Object declared in class Observable
  </code></pre>