class AtomicBoolean extends Serializable
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- AtomicBoolean
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def compareAndExchange(expectedValue: Boolean, newValue: Boolean): Boolean
Atomically sets the value to
newValue
if the current value, referred to as the witness value,== expectedValue
, with memory effects as specified byVarHandle#compareAndExchange
.Atomically sets the value to
newValue
if the current value, referred to as the witness value,== expectedValue
, with memory effects as specified byVarHandle#compareAndExchange
.- expectedValue
the expected value
- newValue
the new value
- returns
the witness value, which will be the same as the expected value if successful
- Since
9
- final def compareAndExchangeAcquire(expectedValue: Boolean, newValue: Boolean): Boolean
Atomically sets the value to
newValue
if the current value, referred to as the witness value,== expectedValue
, with memory effects as specified byVarHandle#compareAndExchangeAcquire
.Atomically sets the value to
newValue
if the current value, referred to as the witness value,== expectedValue
, with memory effects as specified byVarHandle#compareAndExchangeAcquire
.- expectedValue
the expected value
- newValue
the new value
- returns
the witness value, which will be the same as the expected value if successful
- Since
9
- final def compareAndExchangeRelease(expectedValue: Boolean, newValue: Boolean): Boolean
Atomically sets the value to
newValue
if the current value, referred to as the witness value,== expectedValue
, with memory effects as specified byVarHandle#compareAndExchangeRelease
.Atomically sets the value to
newValue
if the current value, referred to as the witness value,== expectedValue
, with memory effects as specified byVarHandle#compareAndExchangeRelease
.- expectedValue
the expected value
- newValue
the new value
- returns
the witness value, which will be the same as the expected value if successful
- Since
9
- final def compareAndSet(expectedValue: Boolean, newValue: Boolean): Boolean
Atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#compareAndSet
.Atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#compareAndSet
.- expectedValue
the expected value
- newValue
the new value
- returns
true
if successful. False return indicates that the actual value was not equal to the expected value.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def get(): Boolean
Returns the current value, with memory effects of volatile read
Returns the current value, with memory effects of volatile read
- returns
the current value
- final def getAcquire: Boolean
Returns the current value, with memory effects as specified by
VarHandle#getAcquire
.Returns the current value, with memory effects as specified by
VarHandle#getAcquire
.- returns
the value
- Since
9
- final def getAndSet(newValue: Boolean): Boolean
Atomically sets the value to
newValue
and returns the old value, with memory effects as specified byVarHandle#getAndSet
.Atomically sets the value to
newValue
and returns the old value, with memory effects as specified byVarHandle#getAndSet
.- newValue
the new value
- returns
the previous value
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def getOpaque: Boolean
Returns the current value, with memory effects as specified by
VarHandle#getOpaque
.Returns the current value, with memory effects as specified by
VarHandle#getOpaque
.- returns
the value
- Since
9
- final def getPlain(): Boolean
Returns the current value, with memory semantics of reading as if the variable was declared non-
volatile
.Returns the current value, with memory semantics of reading as if the variable was declared non-
volatile
.- returns
the value
- Since
9
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def lazySet(newValue: Boolean): Unit
Sets the value to
newValue
, with memory effects as specified byVarHandle#setRelease
.Sets the value to
newValue
, with memory effects as specified byVarHandle#setRelease
.- newValue
the new value
- Since
1.6
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def set(newValue: Boolean): Unit
Sets the value to
newValue
, with memory effects as specified byVarHandle#setVolatile
.Sets the value to
newValue
, with memory effects as specified byVarHandle#setVolatile
.- newValue
the new value
- final def setOpaque(newValue: Boolean): Unit
Sets the value to
newValue
, with memory effects as specified byVarHandle#setOpaque
.Sets the value to
newValue
, with memory effects as specified byVarHandle#setOpaque
.- newValue
the new value
- Since
9
- final def setPlain(newValue: Boolean): Unit
Sets the value to
newValue
, with memory semantics of setting as if the variable was declared non-volatile
and non-final
.Sets the value to
newValue
, with memory semantics of setting as if the variable was declared non-volatile
and non-final
.- newValue
the new value
- Since
9
- final def setRelease(newValue: Boolean): Unit
Sets the value to
newValue
, with memory effects as specified byVarHandle#setRelease
.Sets the value to
newValue
, with memory effects as specified byVarHandle#setRelease
.- newValue
the new value
- Since
9
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Returns the String representation of the current value.
Returns the String representation of the current value.
- returns
the String representation of the current value
- Definition Classes
- AtomicBoolean → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def weakCompareAndSetAcquire(expectedValue: Boolean, newValue: Boolean): Boolean
Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetAcquire
.Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetAcquire
.- expectedValue
the expected value
- newValue
the new value
- returns
true
if successful
- Since
9
- def weakCompareAndSetPlain(expectedValue: Boolean, newValue: Boolean): Boolean
Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetPlain
.Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetPlain
.- expectedValue
the expected value
- newValue
the new value
- returns
true
if successful
- Since
9
- final def weakCompareAndSetRelease(expectedValue: Boolean, newValue: Boolean): Boolean
Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetRelease
.Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetRelease
.- expectedValue
the expected value
- newValue
the new value
- returns
true
if successful
- Since
9
- final def weakCompareAndSetVolatile(expectedValue: Boolean, newValue: Boolean): Boolean
Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSet
.Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSet
.- expectedValue
the expected value
- newValue
the new value
- returns
true
if successful
- Since
9
Deprecated Value Members
- def weakCompareAndSet(expectedValue: Boolean, newValue: Boolean): Boolean
Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetPlain
.Possibly atomically sets the value to
newValue
if the current value== expectedValue
, with memory effects as specified byVarHandle#weakCompareAndSetPlain
.- expectedValue
the expected value
- newValue
the new value
- returns
true
if successful
- Annotations
- @deprecated
- Deprecated
(Since version 9)
- See also
#weakCompareAndSetPlain