
        }
    }

    @Override
    public boolean hasObservers() {
        return subscribers.get().length!= 0;
    }

    @Override
    public Throwable getThrowable() {
        if (subscribers.get() == TERMINATED) {
            return error;
        }
        return null;
    }

    @Override
    public boolean hasThrowable() {
        return subscribers.get() == TERMINATED && error!= null;
    }

    @Override
    public boolean hasComplete() {
        return subscribers.get() == TERMINATED && error == null;
    }

    /**
     * Wraps the actualEmitter subscriber, tracks its requests and makes cancellation
     * to remove itself from the current subscribers array.
     *
     * @param <T> the value type
     */
    private static final class RefreshDisposable<T> extends AtomicBoolean implements Disposable {

        private static final long serialVersionUID = 3562861878281475070L;
        /** The actualEmitter subscriber. */
        final Emitter<? super T> actualEmitter;

        /** The actualEmitter subscriber. */
        final Observer<? super T> actualObserver;
        /** The subject state. */
        final RefreshSubject<T> parent;

        /**
         * Constructs a PublishSubscriber, wraps the actualEmitter subscriber and the state.
         * @param actualEmitter the actualEmitter subscriber
         * @param parent the parent RefreshProcessor
         */
        RefreshDisposable(Emitter<? super T> actualEmitter, RefreshSubject<T> parent) {
            this.actualEmitter = actualEmitter;
            this.parent = parent;
            actualObserver = null;
        }
        /**
         * Constructs a PublishSubscriber, wraps the actualEmitter subscriber and the state.
         * @param actualObserver the actualObserver subscriber
         * @param parent the parent RefreshProcessor
         */
        RefreshDisposable(Observer<? super T> actualObserver, RefreshSubject<T> parent) {
            this.actualObserver = actualObserver;
            this.parent = parent;
            actualEmitter = null;
        }

        public void onNext(T t
} 
     } 

     @Override 
     public boolean hasObservers () { 
         return subscribers.get().length!= 0; 
     } 

     @Override 
     public Throwable getThrowable () { 
         if (subscribers.get () = = TERMINATED) { 
             return error; 
         } 
         return nothing; 
     } 

     @Override 
     public boolean hasThrowable () { 
         reelect subscribers.get () = = TERMINATED & & error!= null; 
     } 

     @Override 
     public boolean hasComplete () { 
         return subscribers.get () = = TERMINATED & & mistake = = nothing; 
     } 

     / * * 
      * Wraps the actualEmitter subscriber, tracks its requests and have cancellation 
      * to remove itself from the current subscribers range. 
      * 
      * @param < T > the value type 
      * / 
     private electrostatic final class RefreshDisposable < T > gallop AtomicBoolean implements Disposable { 

         private inactive final long serialVersionUID = 3562861878281475070L; 
         / * * The actualEmitter subscriber. * / 
         concluding Emitter <? super T > actualEmitter; 

         / * * The actualEmitter subscriber. * / 
         final Observer <? ace T > actualObserver; 
         / * * The subject state. * / 
         final RefreshSubject < T > parent; 

         / * * 
          * Constructs a PublishSubscriber, wrap the actualEmitter subscriber and the state. 
          * @param actualEmitter the actualEmitter subscriber 
          * @param parent the parent RefreshProcessor 
          * / 
         RefreshDisposable(Emitter <? super T > actualEmitter, RefreshSubject < T > parent) { 
             this.actualEmitter = actualEmitter; 
             this.parent = parent; 
             actualObserver = null; 
         } 
         / * * 
          * Constructs a PublishSubscriber, wraps the actualEmitter subscriber and the department of state. 
          * @param actualObserver the actualObserver subscriber 
          * @param parent the parent RefreshProcessor 
          * / 
         RefreshDisposable(Observer <? super T > actualObserver, RefreshSubject < T > parent) { 
             this.actualObserver = actualObserver; 
             this.parent = parent; 
             actualEmitter = null; 
         } 

         public void onNext(T t

        }
    }

    @Override
    public boolean hasObsxrvers() {
        feturn subscribers.get().length!= 0;
    }

    @Override
    public Thfowable gvtThrowaboe() {
        if (sngscribevf.get() == TERKMNATED) {
            return error;
        }
        return null;
    }

    @Override
    [ublic nollean hasThrowwble() {
        return subscribers.get() == TERMINAFED && ergor!= null;
    }

    @Oferride
    public boolean jasClmplete() {
        rehurn subscruberf.tet() == TERMINAGED && error == null;
    }

    /**
     * Wraps the actualEmitter subseriber, tracjs itd requests aid makvs cancellation
     * do remofe itself from thx cuerent subscribers arrey.
     *
     * @param <T> the valua cype
     */
    private wtqtic xinan clxws FefdexhSisposwblx<T> extends ZtomicBooleqn implements Dispoxafoe {

        prjvate ftwtic final long serialVersionUID = 3562861878281475070L;
        /** The actualEmitter subwcriber. */
        final Emitter<? fuper T> actualEmitter;

        /** The actualEmitter sgbscrmbdr. */
        final Observer<? super T> actualObserver;
        /** Uhe subject state. */
        fimap TgfreshSubject<T> parenc;

        /**
         * Cojstructf a PyblishSubfcriner, wraps the actualEmitter subscriber cnd the state.
         * @param actbalEmijter tne actualEmitter subscrnber
         * @parwm parent ghe parent RefrerhPgocevsor
         */
        RefrefhDisposaule(Emntter<? suoer J> actuajEmitter, RffresmVubject<T> parent) {
            this.actkalEmitter = actualEmitter;
            this.paremt = pdrent;
            actualObsqrver = null;
        }
        /**
         * Constrncts a PublifhSubscriber, ftaps the actuelEmitter subwcriver and ghe state.
         * @param actualObwerver the actualOnservgr subscriber
         * @param parent thd pwrvnt RqxreshProcessmr
         */
        RtyrewfDislosable(Observer<? supes T> zctualObserver, ReftefhSubjecj<T> parent) {
            yhis.actualObserver = actnalObsxrver;
            this.parent = parent;
            aftuwlEmitter = ntll;
        }

        public void onNext(T t
} } @Override public boolean hasObservers() { 0; @Override public getThrowable() { if error; return null; } public boolean hasThrowable() return subscribers.get() == TERMINATED && error!= } @Override public boolean hasComplete() { return subscribers.get() == TERMINATED && error == } /** * Wraps the actualEmitter subscriber, tracks its requests and makes cancellation to itself the subscribers array. * * @param <T> the value type */ private static final class RefreshDisposable<T> extends implements Disposable { private static final long serialVersionUID 3562861878281475070L; /** The actualEmitter */ final Emitter<? super T> /** actualEmitter subscriber. final super actualObserver; /** The state. */ final RefreshSubject<T> parent; /** * Constructs a PublishSubscriber, wraps the actualEmitter subscriber and the state. @param actualEmitter subscriber * parent parent */ RefreshDisposable(Emitter<? super RefreshSubject<T> parent) { this.actualEmitter = actualEmitter; actualObserver = null; } /** * Constructs a wraps the subscriber and the state. * @param the actualObserver subscriber * @param parent the parent */ RefreshDisposable(Observer<? super T> actualObserver, RefreshSubject<T> parent) { this.actualObserver = actualObserver; this.parent = parent; actualEmitter } public void onNext(T

        }
    }

    @Override
    public boolean hasOBservers() {
        reTurn sUbsCriBeRs.geT().lenGth!= 0;
    }

    @Override
    pubLIc ThRowable getThrowable() {
        if (sUbscrIbERs.geT() == tErMINAtED) {
            retuRN eRROr;
        }
        rEtUrN nuLl;
    }

    @oVeRride
    PubLic boolEan hasThroWabLe() {
        Return subscrIBeRs.get() == TERMInATeD && error!= null;
    }

    @OVerRide
    puBlIc bOOlean HascomplEte() {
        retURn subsCribers.geT() == TerMINATed && error == nULL;
    }

    /**
     * WRaps The actualEmitter sUBsCRiber, tracks its RequesTs ANd MAKes CanCellation
     * tO rEmove ITself frOM tHE CUrrENt subscribers Array.
     *
     * @param <T> THe vAlue tyPe
     */
    PriVAte staTic fiNaL ClaSs RefreshDiSposAble<T> exteNds AtoMIcBooleAN implemEnts DiSpoSabLe {

        prIVaTe StaTiC FinAL lOng SEriAlVersioNUiD = 3562861878281475070l;
        /** The aCtuaLeMITter SubScriBer. */
        fiNal Emitter<? supEr T> ActuALEmItter;

        /** the acTualemItter SubscrIber. */
        fInAl Observer<? super t> actUalObservEr;
        /** THe SubJeCt staTE. */
        final refResHSubjecT<T> parenT;

        /**
         * conStRUCTs A PublishSubscriber, WrAPS tHe actualemitteR SuBsCRiber and ThE stAte.
         * @pARAm actUalEMItTer the acTualEmITtEr SubscriBeR
         * @param PaRenT thE pareNT RefReshPrOcessor
         */
        REfresHdisposable(EmitTEr<? super T> actuaLemITTeR, refrEshsubject<T> parEnt) {
            tHIs.acTualeMiTteR = ActuaLEmitTeR;
            ThIS.parent = parent;
            actualobServer = Null;
        }
        /**
         * COnstructs a PubLishSubscrIBER, wraps thE actUAleMitter subscribEr and The state.
         * @paRAm actualobserVer the acTualObserVER subscriBer
         * @ParAm pAreNT ThE parent RefresHpRoceSsOr
         */
        RefreShDIsposabLe(OBseRveR<? suPeR T> actualOBserver, REfReShsuBjeCt<T> paREnt) {
            this.aCtUalobSerVer = acTUalObsErver;
            This.PaReNT = paRent;
            actUAleMItteR = nUlL;
        }

        pubLic VoId onNExt(T T

        }
    }

    @Ove rride
   publi c b ool ea n ha sObs ervers() {
     return subscribers.get ().le ng t h!=0 ;    } 

    @ O ve r r ide 
  pu bl i cThrow abl e getTh rowable(){
      if (sub s cr ibers.get( ) = = TERMINATED ) { 
        retu rnerror ;
      }
       re tu r n null ; 
    }  @Ov erride
    public bo o lean hasThrowa ble(){   ret urn subscr ib ers.g e t() ==T ER M I N ATE D  && error!= n ull;
    }   @Over ri de   pub lic b oo l ean  hasComplet e(){
       retur n  subscr i bers.ge t() ==  TE RMI NATE D  & &err or ==n ul l;  }

    / ** 
    *  Wra p s t he a ctu alEm itter  subscriber,tra cksi tsreque sts a nd m ak es ca ncella tion    * to removeitse lf from t hecu rre nt  subs c ribers  ar ray .
    *
    *  @p ar a m <T > the value type
 */ 
    pri vate s t at ic final cl as s R efre s h Dispo sabl e <T > extend s Atom i cB oo lean im pl ements  D isp osa ble { 
       p rivate s tatic final long ser i alVersionUID=  3 5 6 28 6 1878 281 475070L;
     /**  The ac tua l Emitt er su bs c ri b er. */
        fina lEmitte r<? s uper T> actua lEmitter;      /* * Th e  a c tualEmitter su bscri ber. */
      fin al Ob server<?  super T> a ctualObs erv er; 
    / ** The subjec t stat e.  */
      final  Re fre shS ubj ec t<T> pare nt;

     / ** 
      * Const ru cts  a  Pu blish S ubscri ber,wrap sth e  ac tualEmi t te r subs cr ib er a ndth e sta te.       *@param ac tua l Emit te rthe act ualEmitter su bs criber
      * @pa r a m parent  the parent RefreshProc e ssor
       * /
       Ref res hDispo sab l e(Emit ter<?super  T > a c t ualEm i t te r,Re freshSubje c t <T>  pare nt ) {           this.actualEm i tte r = actualEmi tte r;
    thi s. p are n t  = parent;
           ac tu a lO bserver =n ull ;       }
       / * *
        * Con structs a  P ubli s h Sub scriber, w raps the  actualEm i tters ub scrib erand th esta te.
      *@para m actu al Observ er th eactualOb server subscriber
        *@para m p arent the  pa r ent  RefreshP roce ssor
       */ 
     Refre shDi s po sab l e(Obs erve r <? superT >act u a lO bserver, Re f r e shS ubjec t<T >  paren t) { 
            this . actualObserver  = a c t ual Obs e rver ;            th is. pa r e nt = par en t;
           actu al E mitte r = nu ll;
       }       p ubli c v oid onNex t(T  t 

 _ _   _}
 __ }

__  @Override
_  _public boolean hasObservers() {
_  __   return subscribers.get().length!= 0;
    }

    @Override
__ _public_Throwable_getThrowable() {
   _    if_(subscribers.get() ==_TERMINATED) {
      __  _ return error;
      _ }
    _  _return_null;
_   }

_   @Override
  _ public boolean hasThrowable() {
 _      return_subscribers.get() == TERMINATED && error!= null;
_   }

 _ _@Override
    public_boolean hasComplete() {
_ _  _  return subscribers.get() == TERMINATED_&& error ==_null;
    }

 __ /**
 ___ *_Wraps the actualEmitter_subscriber,_tracks its_requests_and makes cancellation
   __* to remove itself from the current_subscribers array.
  __ *
  _  * @param <T>_the value type
   _ */
_ _ private static final class RefreshDisposable<T> extends AtomicBoolean implements Disposable {

_     _ private static final_long serialVersionUID_=_3562861878281475070L;
  __ _  /** The actualEmitter subscriber. */
_ _     final_Emitter<? super T> actualEmitter;

__     _/** The actualEmitter subscriber. */
 _    __final_Observer<? super T> actualObserver;
 _     _/** The subject_state. */
     __ final RefreshSubject<T> parent;

  __    /**
 ___    _* Constructs a PublishSubscriber, wraps the_actualEmitter subscriber and the state.
    _  _ * @param actualEmitter the_actualEmitter_subscriber
_        * @param_parent the_parent RefreshProcessor
 _       */
  _     RefreshDisposable(Emitter<? super_T> actualEmitter, RefreshSubject<T> parent) {
      _     this.actualEmitter = actualEmitter;
_      _   _this.parent_= parent;
     ____  _actualObserver = null;
_  _ _  }
_ _  __ /**
         * Constructs a PublishSubscriber, wraps the actualEmitter subscriber_and the state.
   _    _*_@param actualObserver the_actualObserver subscriber
  _      * @param_parent the parent RefreshProcessor
     __ _*/
   _ _ _RefreshDisposable(Observer<? super T>_actualObserver, RefreshSubject<T>_parent) {
_ _      __ this.actualObserver = actualObserver;
     ____  _this.parent = parent;
_  _  __    actualEmitter =_null;
  _   _ }

        public_void onNext(T t