Package com.mchange.v2.holders
Class SynchronizedBooleanHolder
- java.lang.Object
-
- com.mchange.v2.holders.SynchronizedBooleanHolder
-
- All Implemented Interfaces:
ThreadSafeBooleanHolder
,java.io.Serializable
public class SynchronizedBooleanHolder extends java.lang.Object implements ThreadSafeBooleanHolder, java.io.Serializable
An implementation of ThreadSafeBooleanHolder that synchronizes on itself for all acesses and mutations of the underlying boolean.- See Also:
VolatileBooleanHolder
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedBooleanHolder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getValue()
gets the value of the wrapped booleanvoid
setValue(boolean b)
sets the value of the wrapped boolean
-
-
-
Method Detail
-
getValue
public boolean getValue()
Description copied from interface:ThreadSafeBooleanHolder
gets the value of the wrapped boolean- Specified by:
getValue
in interfaceThreadSafeBooleanHolder
-
setValue
public void setValue(boolean b)
Description copied from interface:ThreadSafeBooleanHolder
sets the value of the wrapped boolean- Specified by:
setValue
in interfaceThreadSafeBooleanHolder
-
-