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 booleangetValue()gets the value of the wrapped booleanvoidsetValue(boolean b)sets the value of the wrapped boolean
-
-
-
Method Detail
-
getValue
public boolean getValue()
Description copied from interface:ThreadSafeBooleanHoldergets the value of the wrapped boolean- Specified by:
getValuein interfaceThreadSafeBooleanHolder
-
setValue
public void setValue(boolean b)
Description copied from interface:ThreadSafeBooleanHoldersets the value of the wrapped boolean- Specified by:
setValuein interfaceThreadSafeBooleanHolder
-
-