インタフェース SScalar<T>
- 型パラメータ:
T- the data class
- すべてのスーパーインタフェース:
SLockable,SVariable,Unlockable
- 既知のサブインタフェースのリスト:
SArrayNode,SBoolean,SClass<T>,SDouble,SFloat,SInteger,SJsonNode,SLong,SNumber<T>,SObjectNode,SString
- 既知の実装クラスのリスト:
SArrayNodeImpl,SBooleanImpl,SClassImpl,SDoubleImpl,SFloatImpl,SIntegerImpl,SJsonNodeImpl,SLongImpl,SNumberImpl,SObjectNodeImpl,SStringImpl
Represents the scalar data.
The scalar data this class has is synchronized with the one on browsers.
-
メソッドの概要
修飾子とタイプメソッド説明booleancompareAndSet(T expected, T update) Atomically sets to the 'update' if the 'expected' is equal to the current value.booleanReturns true if this contains the specified value.booleancontainsAll(Collection<?> values) Returns true if this contains all the specified values.booleanget()Returns the current value.Atomically sets to the specified value and returns the old value.getValue()Returns the current value.intIf the value isList,ArrayNodeor an array, returns the index of the specified value.booleanisEmpty()Returns true if the size is zero.booleanReturns true if the value is not null.booleanisNull()Returns true if the value is null.intlastIndexOf(Object value) If the value isList,ArrayNodeor an array, returns the last index of the specified value.reset()Resets to the current value.Resets to the current value.Sets to the specified value.Sets to the specified value.intsize()voidtoDirty()Marks itself as updated.インタフェースから継承されたメソッド org.wcardinal.controller.data.SLockable
isLocked, lock, tryLock, tryLock, unlock, unlockインタフェースから継承されたメソッド org.wcardinal.controller.data.SVariable
initialize, isInitialized, isNonNull, isReadOnly
-
メソッドの詳細
-
get
Returns the current value.- 戻り値:
- the current value
-
set
Sets to the specified value.- パラメータ:
value- the new value- 戻り値:
- the previous value
-
reset
Resets to the current value.- 戻り値:
- the current value
-
getValue
Returns the current value.- 戻り値:
- the current value
-
setValue
Sets to the specified value.- パラメータ:
value- the new value- 戻り値:
- the previous value
-
resetValue
Resets to the current value.- 戻り値:
- the current value
-
compareAndSet
Atomically sets to the 'update' if the 'expected' is equal to the current value.- パラメータ:
expected- the expected valueupdate- the new value- 戻り値:
- true if the 'expected' is equal to the current value
-
getAndSet
Atomically sets to the specified value and returns the old value.- パラメータ:
value- the new value- 戻り値:
- the previous value
-
toDirty
Marks itself as updated. -
equals
-
size
If the value isCollection,Map,ArrayNodeorObjectNode, returns the its size. If the value is an array, returns the its length. If the value is null, returns 0. For anything else, returns 1.- 戻り値:
- the size of this value
-
isEmpty
Returns true if the size is zero.- 戻り値:
- {boolean} true if the size is zero
-
isNull
Returns true if the value is null.- 戻り値:
- true if the value is null
-
isNotNull
Returns true if the value is not null.- 戻り値:
- true if the value is not null
-
indexOf
If the value isList,ArrayNodeor an array, returns the index of the specified value. Otherwise, returns -1.- パラメータ:
value- value to search for- 戻り値:
- the index of the specified value
-
lastIndexOf
If the value isList,ArrayNodeor an array, returns the last index of the specified value. Otherwise, returns -1.- パラメータ:
value- value to search for- 戻り値:
- the last index of the specified value
-
contains
Returns true if this contains the specified value.- パラメータ:
value- value to search for- 戻り値:
- true if this contains the specified value
-
containsAll
Returns true if this contains all the specified values.- パラメータ:
values- values to search for- 戻り値:
- true if this contains all the specified values
-