public abstract class StaticProperty extends Object
Users of the Static Object Model can define custom subtypes of StaticProperty or use
DefaultStaticProperty
, a trivial default implementation. In both cases, static properties
must be registered to a StaticShape.Builder
using
StaticShape.Builder.property(StaticProperty, Class, boolean)
. Then, after allocating a
StaticShape
instance with one of the StaticShape.Builder.build()
methods and
allocating a static object using the factory class provided by StaticShape.getFactory()
,
users can call the accessor methods defined in StaticProperty to get and set property values
stored in a static object instance.
A StaticProperty instance can be added to only one StaticShape.Builder
. StaticProperty
instances registered to the same StaticShape.Builder
must have
a unique id for that builder.
DefaultStaticProperty
,
StaticShape.Builder.property(StaticProperty, Class, boolean).
Modifier | Constructor and Description |
---|---|
protected |
StaticProperty()
Constructor for subclasses.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndExchangeBoolean(Object obj,
boolean expect,
boolean update)
Atomically sets the boolean value represented by this StaticProperty and stored in the
specified static object to
newValue if the current value, referred to as the
witness value, == the expected value. |
byte |
compareAndExchangeByte(Object obj,
byte expect,
byte update)
Atomically sets the byte value represented by this StaticProperty and stored in the specified
static object to
newValue if the current value, referred to as the witness
value, == the expected value. |
char |
compareAndExchangeChar(Object obj,
char expect,
char update)
Atomically sets the char value represented by this StaticProperty and stored in the specified
static object to
newValue if the current value, referred to as the witness value
, == the expected value. |
double |
compareAndExchangeDouble(Object obj,
double expect,
double update)
Atomically sets the double value represented by this StaticProperty and stored in the
specified static object to
newValue if the current value, referred to as the
witness value, == the expected value. |
float |
compareAndExchangeFloat(Object obj,
float expect,
float update)
Atomically sets the float value represented by this StaticProperty and stored in the
specified static object to
newValue if the current value, referred to as the
witness value, == the expected value. |
int |
compareAndExchangeInt(Object obj,
int expect,
int update)
Atomically sets the int value represented by this StaticProperty and stored in the specified
static object to
newValue if the current value, referred to as the witness
value, == the expected value. |
long |
compareAndExchangeLong(Object obj,
long expect,
long update)
Atomically sets the long value represented by this StaticProperty and stored in the specified
static object to
newValue if the current value, referred to as the witness
value, == the expected value. |
Object |
compareAndExchangeObject(Object obj,
Object expect,
Object update)
Atomically sets the
Object value represented by this StaticProperty and stored in the
specified static object to newValue if the current value, referred to as the
witness value , == the expected value. |
short |
compareAndExchangeShort(Object obj,
short expect,
short update)
Atomically sets the short value represented by this StaticProperty and stored in the
specified static object to
newValue if the current value, referred to as the
witness value, == the expected value. |
boolean |
compareAndSwapBoolean(Object obj,
boolean expect,
boolean update)
Atomically sets the boolean value represented by this StaticProperty and stored in the
specified static object to the given updated value if the current value
== the
expected value. |
boolean |
compareAndSwapByte(Object obj,
byte expect,
byte update)
Atomically sets the byte value represented by this StaticProperty and stored in the specified
static object to the given updated value if the current value
== the expected value. |
boolean |
compareAndSwapChar(Object obj,
char expect,
char update)
Atomically sets the char value represented by this StaticProperty and stored in the specified
static object to the given updated value if the current value
== the expected value. |
boolean |
compareAndSwapDouble(Object obj,
double expect,
double update)
Atomically sets the double value represented by this StaticProperty and stored in the
specified static object to the given updated value if the current value
== the
expected value. |
boolean |
compareAndSwapFloat(Object obj,
float expect,
float update)
Atomically sets the float value represented by this StaticProperty and stored in the
specified static object to the given updated value if the current value
== the
expected value. |
boolean |
compareAndSwapInt(Object obj,
int expect,
int update)
Atomically sets the int value represented by this StaticProperty and stored in the specified
static object to the given updated value if the current value
== the expected value. |
boolean |
compareAndSwapLong(Object obj,
long expect,
long update)
Atomically sets the long value represented by this StaticProperty and stored in the specified
static object to the given updated value if the current value
== the expected value. |
boolean |
compareAndSwapObject(Object obj,
Object expect,
Object update)
Atomically sets the
Object value represented by this StaticProperty and stored in the
specified static object to the given updated value if the current value == the
expected value. |
boolean |
compareAndSwapShort(Object obj,
short expect,
short update)
Atomically sets the short value represented by this StaticProperty and stored in the
specified static object to the given updated value if the current value
== the
expected value. |
int |
getAndAddInt(Object obj,
int delta)
Atomically adds the given value to the current int value represented by this StaticProperty
and stored in the specified static object.
|
long |
getAndAddLong(Object obj,
long delta)
Atomically adds the given value to the current long value represented by this StaticProperty
and stored in the specified static object.
|
int |
getAndSetInt(Object obj,
int value)
Atomically sets the int value represented by this StaticProperty and stored in the specified
static object to the given value and returns the old value.
|
long |
getAndSetLong(Object obj,
long value)
Atomically sets the long value represented by this StaticProperty and stored in the specified
static object to the given value and returns the old value.
|
Object |
getAndSetObject(Object obj,
Object value)
Atomically sets the
Object value represented by this StaticProperty and stored in the
specified static object to the given value and returns the old value. |
boolean |
getBoolean(Object obj)
Returns the boolean value represented by this StaticProperty and stored in the specified
static object.
|
boolean |
getBooleanVolatile(Object obj)
Returns the boolean value represented by this StaticProperty and stored in the specified
static object.
|
byte |
getByte(Object obj)
Returns the byte value represented by this StaticProperty and stored in the specified static
object.
|
byte |
getByteVolatile(Object obj)
Returns the byte value represented by this StaticProperty and stored in the specified static
object.
|
char |
getChar(Object obj)
Returns the char value represented by this StaticProperty and stored in the specified static
object.
|
char |
getCharVolatile(Object obj)
Returns the char value represented by this StaticProperty and stored in the specified static
object.
|
double |
getDouble(Object obj)
Returns the double value represented by this StaticProperty and stored in the specified
static object.
|
double |
getDoubleVolatile(Object obj)
Returns the double value represented by this StaticProperty and stored in the specified
static object.
|
float |
getFloat(Object obj)
Returns the float value represented by this StaticProperty and stored in the specified static
object.
|
float |
getFloatVolatile(Object obj)
Returns the float value represented by this StaticProperty and stored in the specified static
object.
|
protected abstract String |
getId()
StaticProperty instances must have a
String identifier that is unique and constant
for that shape. |
int |
getInt(Object obj)
Returns the int value represented by this StaticProperty and stored in the specified static
object.
|
int |
getIntVolatile(Object obj)
Returns the int value represented by this StaticProperty and stored in the specified static
object.
|
long |
getLong(Object obj)
Returns the long value represented by this StaticProperty and stored in the specified static
object.
|
long |
getLongVolatile(Object obj)
Returns the long value represented by this StaticProperty and stored in the specified static
object.
|
Object |
getObject(Object obj)
Returns the
Object value represented by this StaticProperty and stored in the
specified static object. |
Object |
getObjectVolatile(Object obj)
Returns the
Object value represented by this StaticProperty and stored in the
specified static object. |
short |
getShort(Object obj)
Returns the short value represented by this StaticProperty and stored in the specified static
object.
|
short |
getShortVolatile(Object obj)
Returns the short value represented by this StaticProperty and stored in the specified static
object.
|
void |
setBoolean(Object obj,
boolean value)
Sets the boolean value represented by this StaticProperty and stored in the specified static
object.
|
void |
setBooleanVolatile(Object obj,
boolean value)
Sets the boolean value represented by this StaticProperty and stored in the specified static
object.
|
void |
setByte(Object obj,
byte value)
Sets the byte value represented by this StaticProperty and stored in the specified static
object.
|
void |
setByteVolatile(Object obj,
byte value)
Sets the byte value represented by this StaticProperty and stored in the specified static
object.
|
void |
setChar(Object obj,
char value)
Sets the char value represented by this StaticProperty and stored in the specified static
object.
|
void |
setCharVolatile(Object obj,
char value)
Sets the char value represented by this StaticProperty and stored in the specified static
object.
|
void |
setDouble(Object obj,
double value)
Sets the double value represented by this StaticProperty and stored in the specified static
object.
|
void |
setDoubleVolatile(Object obj,
double value)
Sets the double value represented by this StaticProperty and stored in the specified static
object.
|
void |
setFloat(Object obj,
float value)
Sets the float value represented by this StaticProperty and stored in the specified static
object.
|
void |
setFloatVolatile(Object obj,
float value)
Sets the float value represented by this StaticProperty and stored in the specified static
object.
|
void |
setInt(Object obj,
int value)
Sets the int value represented by this StaticProperty and stored in the specified static
object.
|
void |
setIntVolatile(Object obj,
int value)
Sets the int value represented by this StaticProperty and stored in the specified static
object.
|
void |
setLong(Object obj,
long value)
Sets the long value represented by this StaticProperty and stored in the specified static
object.
|
void |
setLongVolatile(Object obj,
long value)
Sets the long value represented by this StaticProperty and stored in the specified static
object.
|
void |
setObject(Object obj,
Object value)
Sets the
Object value represented by this StaticProperty and stored in the specified
static object. |
void |
setObjectVolatile(Object obj,
Object value)
Sets the
Object value represented by this StaticProperty and stored in the specified
static object. |
void |
setShort(Object obj,
short value)
Sets the short value represented by this StaticProperty and stored in the specified static
object.
|
void |
setShortVolatile(Object obj,
short value)
Sets the short value represented by this StaticProperty and stored in the specified static
object.
|
protected StaticProperty()
protected abstract String getId()
String
identifier that is unique and constant
for that shape. Subtypes of StaticProperty must make sure that the value returned by this
method is constant in time.public final Object getObject(Object obj)
Object
value represented by this StaticProperty and stored in the
specified static object. This property access has the memory semantics of reading as if the
variable was declared non-volatile.obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is primitive, or obj does not
have a StaticShape
compatible with this static propertypublic final Object getObjectVolatile(Object obj)
Object
value represented by this StaticProperty and stored in the
specified static object. This property access has the memory semantics of reading as if the
variable was declared volatile.obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is primitive, or obj does not
have a StaticShape
compatible with this static propertypublic final void setObject(Object obj, Object value)
Object
value represented by this StaticProperty and stored in the specified
static object. This property access has the memory semantics of setting as if the variable
was declared non-volatile.obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not assignable from
the type of value
, or obj does not have a
StaticShape
compatible with this static propertypublic final void setObjectVolatile(Object obj, Object value)
Object
value represented by this StaticProperty and stored in the specified
static object. This property access has the memory semantics of setting as if the variable
was declared volatile.obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not assignable from
the type of value
, or obj does not have a
StaticShape
compatible with this static propertypublic final boolean compareAndSwapObject(Object obj, Object expect, Object update)
Object
value represented by this StaticProperty and stored in the
specified static object to the given updated value if the current value ==
the
expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not assignable from
the type of value
, or obj does not have a
StaticShape
compatible with this static propertypublic final Object getAndSetObject(Object obj, Object value)
Object
value represented by this StaticProperty and stored in the
specified static object to the given value and returns the old value.obj
- the static object that stores the static property valuevalue
- the new valueIllegalArgumentException
- if the static property type is not assignable from
the type of value
, or obj does not have a
StaticShape
compatible with this static propertypublic final Object compareAndExchangeObject(Object obj, Object expect, Object update)
Object
value represented by this StaticProperty and stored in the
specified static object to newValue
if the current value, referred to as the
witness value , ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not assignable from
the type of value
, or obj does not have a
StaticShape
compatible with this static propertypublic final boolean getBoolean(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the boolean class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean getBooleanVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the boolean class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setBoolean(Object obj, boolean value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the boolean class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setBooleanVolatile(Object obj, boolean value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the boolean class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapBoolean(Object obj, boolean expect, boolean update)
==
the
expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the boolean class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndExchangeBoolean(Object obj, boolean expect, boolean update)
newValue
if the current value, referred to as the
witness value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the boolean class, or obj
does not have a StaticShape
compatible with this static propertypublic final byte getByte(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the byte class, or obj
does not have a StaticShape
compatible with this static propertypublic final byte getByteVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the byte class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setByte(Object obj, byte value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the byte class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setByteVolatile(Object obj, byte value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the byte class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapByte(Object obj, byte expect, byte update)
==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the byte class, or obj
does not have a StaticShape
compatible with this static propertypublic final byte compareAndExchangeByte(Object obj, byte expect, byte update)
newValue
if the current value, referred to as the witness
value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the byte class, or obj
does not have a StaticShape
compatible with this static propertypublic final char getChar(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the char class, or obj
does not have a StaticShape
compatible with this static propertypublic final char getCharVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the char class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setChar(Object obj, char value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the char class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setCharVolatile(Object obj, char value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the char class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapChar(Object obj, char expect, char update)
==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the char class, or obj
does not have a StaticShape
compatible with this static propertypublic final char compareAndExchangeChar(Object obj, char expect, char update)
newValue
if the current value, referred to as the witness value
, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the char class, or obj
does not have a StaticShape
compatible with this static propertypublic final double getDouble(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the double class, or obj
does not have a StaticShape
compatible with this static propertypublic final double getDoubleVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the double class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setDouble(Object obj, double value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the double class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setDoubleVolatile(Object obj, double value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the double class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapDouble(Object obj, double expect, double update)
==
the
expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the double class, or obj
does not have a StaticShape
compatible with this static propertypublic final double compareAndExchangeDouble(Object obj, double expect, double update)
newValue
if the current value, referred to as the
witness value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the double class, or obj
does not have a StaticShape
compatible with this static propertypublic final float getFloat(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the float class, or obj
does not have a StaticShape
compatible with this static propertypublic final float getFloatVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the float class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setFloat(Object obj, float value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the float class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setFloatVolatile(Object obj, float value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the float class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapFloat(Object obj, float expect, float update)
==
the
expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the float class, or obj
does not have a StaticShape
compatible with this static propertypublic final float compareAndExchangeFloat(Object obj, float expect, float update)
newValue
if the current value, referred to as the
witness value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the float class, or obj
does not have a StaticShape
compatible with this static propertypublic final int getInt(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final int getIntVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setInt(Object obj, int value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setIntVolatile(Object obj, int value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapInt(Object obj, int expect, int update)
==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final int compareAndExchangeInt(Object obj, int expect, int update)
newValue
if the current value, referred to as the witness
value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuepublic final int getAndAddInt(Object obj, int delta)
obj
- the static object that stores the static property valuedelta
- the value to addIllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final int getAndSetInt(Object obj, int value)
obj
- the static object that stores the static property valuevalue
- the new valueIllegalArgumentException
- if the static property type is not the int class, or obj
does not have a StaticShape
compatible with this static propertypublic final long getLong(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final long getLongVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setLong(Object obj, long value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setLongVolatile(Object obj, long value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapLong(Object obj, long expect, long update)
==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final long compareAndExchangeLong(Object obj, long expect, long update)
newValue
if the current value, referred to as the witness
value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final long getAndAddLong(Object obj, long delta)
obj
- the static object that stores the static property valuedelta
- the value to addIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final long getAndSetLong(Object obj, long value)
obj
- the static object that stores the static property valuevalue
- the new valueIllegalArgumentException
- if the static property type is not the long class, or obj
does not have a StaticShape
compatible with this static propertypublic final short getShort(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the short class, or obj
does not have a StaticShape
compatible with this static propertypublic final short getShortVolatile(Object obj)
obj
- the static object that stores the static property valueIllegalArgumentException
- if the static property type is not the short class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setShort(Object obj, short value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the short class, or obj
does not have a StaticShape
compatible with this static propertypublic final void setShortVolatile(Object obj, short value)
obj
- the static object that stores the static property valuevalue
- the new static property value, to be stored in static object objIllegalArgumentException
- if the static property type is not the short class, or obj
does not have a StaticShape
compatible with this static propertypublic final boolean compareAndSwapShort(Object obj, short expect, short update)
==
the
expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that the actual value was not
equal to the expected value.IllegalArgumentException
- if the static property type is not the short class, or obj
does not have a StaticShape
compatible with this static propertypublic final short compareAndExchangeShort(Object obj, short expect, short update)
newValue
if the current value, referred to as the
witness value, ==
the expected value.obj
- the static object that stores the static property valueexpect
- the expected valueupdate
- the new valueIllegalArgumentException
- if the static property type is not the short class, or obj
does not have a StaticShape
compatible with this static property