Record Class CacheTestSupport.CacheOperation.PutIfAbsent<K,V>
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.testing.CacheTestSupport.CacheOperation.PutIfAbsent<K,V>
- Type Parameters:
K- key type | 键类型V- value type | 值类型- Record Components:
key- the key | 键value- the value | 值
- All Implemented Interfaces:
CacheTestSupport.CacheOperation<K,V>
- Enclosing interface:
CacheTestSupport.CacheOperation<K,V>
public static record CacheTestSupport.CacheOperation.PutIfAbsent<K,V> (K key, V value)
extends Record
implements CacheTestSupport.CacheOperation<K,V>
Put if absent operation | 不存在则放入操作
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface CacheTestSupport.CacheOperation
CacheTestSupport.CacheOperation.Get<K,V>, CacheTestSupport.CacheOperation.GetAll<K, V>, CacheTestSupport.CacheOperation.GetWithLoader<K, V>, CacheTestSupport.CacheOperation.Invalidate<K, V>, CacheTestSupport.CacheOperation.InvalidateAll<K, V>, CacheTestSupport.CacheOperation.Put<K, V>, CacheTestSupport.CacheOperation.PutAll<K, V>, CacheTestSupport.CacheOperation.PutAllWithTtl<K, V>, CacheTestSupport.CacheOperation.PutIfAbsent<K, V>, CacheTestSupport.CacheOperation.PutIfAbsentWithTtl<K, V>, CacheTestSupport.CacheOperation.PutWithTtl<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionPutIfAbsent(K key, V value) Creates an instance of aPutIfAbsentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
PutIfAbsent
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
key
-
value
-