"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.AtomicNumber = void 0
// tracing: off
require("../../Operator")
const AtomicReference_1 = require("../AtomicReference")
class AtomicNumber extends AtomicReference_1.AtomicReference {
  constructor(n) {
    super(n)
    this.incrementAndGet = this.incrementAndGet.bind(this)
    this.decrementAndGet = this.decrementAndGet.bind(this)
  }
  incrementAndGet() {
    this.set(this.get + 1)
    return this.get
  }
  decrementAndGet() {
    this.set(this.get - 1)
    return this.get
  }
  getAndIncrement() {
    const ret = this.get
    this.set(this.get + 1)
    return ret
  }
}
exports.AtomicNumber = AtomicNumber
//# sourceMappingURL=index.js.map
