Class AbstractConcurrentSizedCollectionWrapper<W>
java.lang.Object
ru.progrm_jarvis.javacommons.collection.concurrent.ConcurrentWrapper<W>
ru.progrm_jarvis.javacommons.collection.concurrent.AbstractConcurrentSizedCollectionWrapper<W>
- All Implemented Interfaces:
SizedCollection
- Direct Known Subclasses:
ConcurrentCollectionWrapper,ConcurrentMapWrapper,ConcurrentSetFromMapWrapper
public abstract class AbstractConcurrentSizedCollectionWrapper<W>
extends ConcurrentWrapper<W>
implements SizedCollection
-
Field Summary
Fields inherited from class ru.progrm_jarvis.javacommons.collection.concurrent.ConcurrentWrapper
readLock, wrapped, writeLock -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConcurrentSizedCollectionWrapper(W wrapped, @NotNull Lock readLock, @NotNull Lock writeLock) -
Method Summary
Methods inherited from class ru.progrm_jarvis.javacommons.collection.concurrent.ConcurrentWrapper
equals, hashCode, toString
-
Constructor Details
-
AbstractConcurrentSizedCollectionWrapper
-
-
Method Details
-
size
public int size()Description copied from interface:SizedCollectionGets the size of this collection.- Specified by:
sizein interfaceSizedCollection- Returns:
- size of this collection
-
internalSize
protected abstract int internalSize() -
isEmpty
public boolean isEmpty()Description copied from interface:SizedCollectionChecks if this collection is empty.- Specified by:
isEmptyin interfaceSizedCollection- Returns:
trueif this collection is empty andfalseotherwise
-
internalIsEmpty
protected abstract boolean internalIsEmpty() -
clear
public void clear()Description copied from interface:SizedCollectionClears this collection.- Specified by:
clearin interfaceSizedCollection
-
internalClear
protected abstract void internalClear()
-