JavaScript is disabled on your browser.
Type Parameters:
S - the type of elements stored in the container, which must implement the Tracked interface
K - the type of key associated with each element, which must extend WorldKey
All Known Implementing Classes:
ArraySectionContainer , DynamicSectionContainer , MapContainer
Represents a container for managing sections of data associated with spatial positions.
Provides methods for accessing, modifying, and retrieving the elements within the container.
This container works with elements that are
Tracked and are associated with a key
implementing
WorldKey.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods
default void
Copies every entry from this container into the given target container.
Retrieves the holder stored at the given position.
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<Holder <S ,K >>
default boolean
void
Stores or clears the holder at the given position.
default int
Method Details
get
Retrieves the holder stored at the given position.
Parameters:
position - the index to look up
Returns:
the holder at the position, or null if empty
set
void set (int position,
Holder <S ,K > holder)
Stores or clears the holder at the given position.
Parameters:
position - the index to store the holder at
holder - the holder to store, or null to clear the position
getAll
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<Holder <S ,K >> getAll ()
Returns:
a map of position to holder for every non-null entry in this container
size
default int size ()
Returns:
the number of occupied positions in this container
isEmpty
default boolean isEmpty ()
Returns:
true if no positions are currently occupied
copyTo
Copies every entry from this container into the given target container.
Parameters:
target - the container to copy entries into