Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
/** @constructor */
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable = (function() {
  ScalaJS.c.java_lang_Object.call(this);
  this.state$1 = null;
  this.State$module$1 = null
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype = new ScalaJS.inheritable.java_lang_Object();
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.constructor = ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable;
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.State$lzycompute__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$ = (function() {
  if ((this.State$module$1 === null)) {
    this.State$module$1 = new ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable$State$().init___Lmonifu_concurrent_cancelables_SingleAssignmentCancelable(this)
  };
  ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
  return this.State$module$1
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.isCanceled__Z = (function() {
  var x1 = ScalaJS.as.monifu_concurrent_cancelables_SingleAssignmentCancelable$State(this.state$1.get__O());
  matchEnd8: {
    if (ScalaJS.anyRefEqEq(this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsEmptyCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsEmptyCanceled$(), x1)) {
      var jsx$1 = true;
      break matchEnd8
    };
    if (ScalaJS.anyRefEqEq(this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsCanceled$(), x1)) {
      var jsx$1 = true;
      break matchEnd8
    };
    var jsx$1 = false;
    break matchEnd8
  };
  if (jsx$1) {
    return true
  };
  return false
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.update__Lmonifu_concurrent_Cancelable__V = (function(value) {
  var _$this = this;
  tailCallLoop: while (true) {
    var x1 = ScalaJS.as.monifu_concurrent_cancelables_SingleAssignmentCancelable$State(_$this.state$1.get__O());
    matchEnd8: {
      if (ScalaJS.anyRefEqEq(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().Empty__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$Empty$(), x1)) {
        if ((!_$this.state$1.compareAndSet__O__O__Z(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().Empty__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$Empty$(), new ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsNotCanceled().init___Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$__Lmonifu_concurrent_Cancelable(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$(), value)))) {
          continue tailCallLoop;
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd8
        } else {
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd8
        }
      };
      if (ScalaJS.anyRefEqEq(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsEmptyCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsEmptyCanceled$(), x1)) {
        if ((!_$this.state$1.compareAndSet__O__O__Z(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsEmptyCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsEmptyCanceled$(), _$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsCanceled$()))) {
          continue tailCallLoop;
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd8
        } else {
          value.cancel__V();
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd8
        }
      };
      matchEnd13: {
        if (ScalaJS.anyRefEqEq(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsCanceled$(), x1)) {
          var jsx$2 = true;
          break matchEnd13
        };
        if (ScalaJS.is.monifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsNotCanceled(x1)) {
          var jsx$2 = true;
          break matchEnd13
        };
        var jsx$2 = false;
        break matchEnd13
      };
      if (jsx$2) {
        throw new ScalaJS.c.java_lang_IllegalStateException().init___T("Cannot assign to SingleAssignmentCancelable, as it was already assigned once")
      };
      throw new ScalaJS.c.scala_MatchError().init___O(x1)
    };
    return undefined
  }
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.cancel__V = (function() {
  var _$this = this;
  tailCallLoop: while (true) {
    var x1 = ScalaJS.as.monifu_concurrent_cancelables_SingleAssignmentCancelable$State(_$this.state$1.get__O());
    matchEnd7: {
      if (ScalaJS.anyRefEqEq(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().Empty__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$Empty$(), x1)) {
        if ((!_$this.state$1.compareAndSet__O__O__Z(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().Empty__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$Empty$(), _$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsEmptyCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsEmptyCanceled$()))) {
          continue tailCallLoop;
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd7
        } else {
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd7
        }
      };
      if (ScalaJS.is.monifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsNotCanceled(x1)) {
        var x2 = ScalaJS.as.monifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsNotCanceled(x1);
        var s = x2.s__Lmonifu_concurrent_Cancelable();
        if ((!_$this.state$1.compareAndSet__O__O__Z(x2, _$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsCanceled$()))) {
          continue tailCallLoop;
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd7
        } else {
          s.cancel__V();
          ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
          break matchEnd7
        }
      };
      matchEnd12: {
        if (ScalaJS.anyRefEqEq(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsEmptyCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsEmptyCanceled$(), x1)) {
          var jsx$3 = true;
          break matchEnd12
        };
        if (ScalaJS.anyRefEqEq(_$this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().IsCanceled__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$IsCanceled$(), x1)) {
          var jsx$3 = true;
          break matchEnd12
        };
        var jsx$3 = false;
        break matchEnd12
      };
      if (jsx$3) {
        ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
        break matchEnd7
      };
      throw new ScalaJS.c.scala_MatchError().init___O(x1)
    };
    return undefined
  }
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.$$colon$eq__Lmonifu_concurrent_Cancelable__V = (function(value) {
  this.update__Lmonifu_concurrent_Cancelable__V(value)
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$ = (function() {
  if ((this.State$module$1 === null)) {
    return this.State$lzycompute__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$()
  } else {
    return this.State$module$1
  }
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.init___ = (function() {
  ScalaJS.c.java_lang_Object.prototype.init___.call(this);
  this.state$1 = ScalaJS.modules.monifu_concurrent_atomic_AtomicAny().apply__O__Lmonifu_concurrent_atomic_AtomicAny(this.State__p1__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$().Empty__Lmonifu_concurrent_cancelables_SingleAssignmentCancelable$State$Empty$());
  return this
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.$$colon$eq__Lmonifu_concurrent_Cancelable__ = (function(value) {
  return ScalaJS.bV(this.$$colon$eq__Lmonifu_concurrent_Cancelable__V(value))
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.cancel__ = (function() {
  return ScalaJS.bV(this.cancel__V())
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.update__Lmonifu_concurrent_Cancelable__ = (function(value$2) {
  return ScalaJS.bV(this.update__Lmonifu_concurrent_Cancelable__V(value$2))
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.isCanceled__ = (function() {
  return ScalaJS.bZ(this.isCanceled__Z())
});
/** @constructor */
ScalaJS.inheritable.monifu_concurrent_cancelables_SingleAssignmentCancelable = (function() {
  /*<skip>*/
});
ScalaJS.inheritable.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype = ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype;
ScalaJS.is.monifu_concurrent_cancelables_SingleAssignmentCancelable = (function(obj) {
  return (!(!((obj && obj.$classData) && obj.$classData.ancestors.monifu_concurrent_cancelables_SingleAssignmentCancelable)))
});
ScalaJS.as.monifu_concurrent_cancelables_SingleAssignmentCancelable = (function(obj) {
  if ((ScalaJS.is.monifu_concurrent_cancelables_SingleAssignmentCancelable(obj) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwClassCastException(obj, "monifu.concurrent.cancelables.SingleAssignmentCancelable")
  }
});
ScalaJS.isArrayOf.monifu_concurrent_cancelables_SingleAssignmentCancelable = (function(obj, depth) {
  return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.monifu_concurrent_cancelables_SingleAssignmentCancelable)))
});
ScalaJS.asArrayOf.monifu_concurrent_cancelables_SingleAssignmentCancelable = (function(obj, depth) {
  if ((ScalaJS.isArrayOf.monifu_concurrent_cancelables_SingleAssignmentCancelable(obj, depth) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwArrayCastException(obj, "Lmonifu.concurrent.cancelables.SingleAssignmentCancelable;", depth)
  }
});
ScalaJS.data.monifu_concurrent_cancelables_SingleAssignmentCancelable = new ScalaJS.ClassTypeData({
  monifu_concurrent_cancelables_SingleAssignmentCancelable: 0
}, false, "monifu.concurrent.cancelables.SingleAssignmentCancelable", ScalaJS.data.java_lang_Object, {
  monifu_concurrent_cancelables_SingleAssignmentCancelable: 1,
  monifu_concurrent_Cancelable: 1,
  java_lang_Object: 1
});
ScalaJS.c.monifu_concurrent_cancelables_SingleAssignmentCancelable.prototype.$classData = ScalaJS.data.monifu_concurrent_cancelables_SingleAssignmentCancelable;
//@ sourceMappingURL=SingleAssignmentCancelable.js.map
New to GrepCode? Check out our FAQ X