java.lang.Object
ovh.paulem.arcana.regions.container.blocks.DynamicSectionContainer<S,K>
- Type Parameters:
S- the type of tracked objects, which must implement theTrackedinterfaceK- the type of the key associated with the tracked object
- All Implemented Interfaces:
SectionContainer<S,K>
public class DynamicSectionContainer<S extends Tracked<K>,K extends WorldKey>
extends Object
implements SectionContainer<S,K>
A container implementation that dynamically transitions between a
MapContainer and
an ArraySectionContainer based on the load factor and size constraints. This class is
designed to optimize memory usage and performance by starting with an efficient map-based
container and expanding into an array-based container when necessary.-
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends Tracked<K>,K extends WorldKey>
DynamicSectionContainer<S, K> create(float loadFactor, int maxSize) static <S extends Tracked<K>,K extends WorldKey>
DynamicSectionContainer<S, K> create(int maxSize) get(int position) getAll()voidputAll(SectionContainer<S, K> other) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ovh.paulem.arcana.regions.container.blocks.SectionContainer
copyTo, isEmpty, size
-
Method Details
-
create
public static <S extends Tracked<K>,K extends WorldKey> DynamicSectionContainer<S,K> create(float loadFactor, int maxSize) -
create
public static <S extends Tracked<K>,K extends WorldKey> DynamicSectionContainer<S,K> create(int maxSize) -
get
-
set
-
getAll
-
putAll
-