Interface Resizable
- All Known Implementing Classes:
PrimitiveMinHeap,QuaternaryPrimitiveMinHeap
public interface Resizable
Contract for data structures that can dynamically resize their internal storage.
- Since:
- 5.4.3
-
Method Summary
Modifier and TypeMethodDescriptionintcapacity()Returns the current capacity of the internal storage.voidEnsures the internal storage has sufficient capacity, resizing if necessary.
-
Method Details
-
ensureCapacity
void ensureCapacity()Ensures the internal storage has sufficient capacity, resizing if necessary. -
capacity
int capacity()Returns the current capacity of the internal storage.- Returns:
- the total capacity before resizing is needed
-