- Type Parameters:
T
- Type of reusable object
- All Implemented Interfaces:
- Serializable, Int2ObjFunction<T>
public class MultiSizedReusable<T>
extends Object
implements Int2ObjFunction<T>
Holds reusable objects of multiple sizes.
Example usecase, is when we need a hashmap - that we will insert and iterate
on, both clear() and iterate method depend on size. And if we want to reuse
objects, we want to have multiple objects of different sizes, that we will
reuse.
Instead of creating object for each distinct size, it creates objects with
first larger power of 2.
- See Also:
- Serialized Form