2020-11-28 15:05:28 +01:00
|
|
|
package speiger.src.collections.utils;
|
|
|
|
|
|
|
|
import java.util.RandomAccess;
|
|
|
|
|
2020-12-06 09:32:22 +01:00
|
|
|
/**
|
|
|
|
* A Helper interface that allows to detect if the Underlying implementation is
|
|
|
|
* using a Array. This allows to read methods through synchronization layers.
|
|
|
|
* Also it implements {@link RandomAccess} and {@link ITrimmable}
|
|
|
|
*/
|
2020-11-28 15:05:28 +01:00
|
|
|
public interface IArray extends RandomAccess, ITrimmable
|
|
|
|
{
|
2020-12-06 09:32:22 +01:00
|
|
|
/**
|
|
|
|
* Increases the capacity of this implementation instance, if necessary,
|
|
|
|
* to ensure that it can hold at least the number of elements specified by
|
|
|
|
* the minimum capacity argument.
|
|
|
|
*
|
|
|
|
* @param size the desired minimum capacity
|
|
|
|
*/
|
2021-09-25 20:23:01 +02:00
|
|
|
void ensureCapacity(int size);
|
2020-11-28 15:05:28 +01:00
|
|
|
}
|