public Observable < ArrayList < SoundCloudComment > > getTrackComments ( final SoundCloudTrack track ) { checkState ( ) ; if ( mCacheRam . tracksComments . get ( track . getId ( ) ) != null ) { return Observable . create ( new Observable . OnSubscribe < ArrayList < SoundCloudComment > > ( ) { @ Override public void call ( Subscriber < ? super ArrayList < SoundCloudComment > > subscriber ) { subscriber . onNext ( mCacheRam . tracksComments . get ( track . getId ( ) ) ) ; subscriber . onCompleted ( ) ; } } ) ; } else { return mRetrofitService . getTrackComments ( track . getId ( ) ) . map ( RxParser . PARSE_COMMENTS ) . map ( cacheTrackComments ( ) ) ; } }
Retrieve comments related to a track of the supported artist .