Interface SizedCollection
- All Known Implementing Classes:
AbstractConcurrentSizedCollectionWrapper,ConcurrentCollectionWrapper,ConcurrentDequeWrapper,ConcurrentListWrapper,ConcurrentMapWrapper,ConcurrentQueueWrapper,ConcurrentSetFromMapWrapper,ConcurrentSetWrapper
public interface SizedCollection
A sized collection.
This is a convenient interface applicable both to
Collection and Map.-
Method Summary
-
Method Details
-
size
int size()Gets the size of this collection.- Returns:
- size of this collection
-
isEmpty
boolean isEmpty()Checks if this collection is empty.- Returns:
trueif this collection is empty andfalseotherwise
-
clear
@Contract(mutates="this") void clear()Clears this collection.- Throws:
UnsupportedOperationException- if clearing is not supported by this collection (e.g. it is unmodifiable)
-