Class ConcurrentWrapper<W>
java.lang.Object
ru.progrm_jarvis.javacommons.collection.concurrent.ConcurrentWrapper<W>
- Type Parameters:
W- type of wrapped value
- Direct Known Subclasses:
AbstractConcurrentSizedCollectionWrapper
Base for all concurrent wrappers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConcurrentWrapper(W wrapped, @NotNull Lock readLock, @NotNull Lock writeLock) -
Method Summary
-
Field Details
-
wrapped
-
readLock
-
writeLock
-
-
Constructor Details
-
ConcurrentWrapper
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classObject- Implementation note
- this method is not concurrent because if modification happens
then the result of its call is anyway irrelevant, simply calls to
wrapped'sObject.hashCode()method as it provides a logically unique value
-
equals
- Overrides:
equalsin classObject- Implementation note
- this method is not concurrent because if modification happens
then the result of its call is anyway irrelevant, simply calls to
wrapped'sObject.equals(Object)method as it provides mostly symmetric logic
-
toString
-