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
  • Constructor Details

    • AbstractConcurrentSizedCollectionWrapper

      protected AbstractConcurrentSizedCollectionWrapper(@NotNull W wrapped, @NotNull @NotNull Lock readLock, @NotNull @NotNull Lock writeLock)
  • Method Details

    • size

      public int size()
      Description copied from interface: SizedCollection
      Gets the size of this collection.
      Specified by:
      size in interface SizedCollection
      Returns:
      size of this collection
    • internalSize

      protected abstract int internalSize()
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: SizedCollection
      Checks if this collection is empty.
      Specified by:
      isEmpty in interface SizedCollection
      Returns:
      true if this collection is empty and false otherwise
    • internalIsEmpty

      protected abstract boolean internalIsEmpty()
    • clear

      public void clear()
      Description copied from interface: SizedCollection
      Clears this collection.
      Specified by:
      clear in interface SizedCollection
    • internalClear

      protected abstract void internalClear()