Attributes
- Companion
- class
- Source
- ChunkMap.scala
- Graph
-
- Supertypes
- Self type
-
ChunkMap.type
Members list
Type members
Classlikes
A mutable builder for constructing instances of ChunkMap.
A mutable builder for constructing instances of ChunkMap.
This builder allows efficient assembly of a ChunkMap by enabling progressive addition of key-value pairs. Duplicate keys are supported; in case of duplicates, the latest associated value overwrites the previous value.
Type parameters
- K
-
The type of keys in the map.
- V
-
The type of values in the map.
Value parameters
- initCapacity
-
The initial capacity for the internal storage of keys and values. Defaults to 4 if not explicitly provided. Methods:
addOne: Adds a single key-value pair to the map being built.clear: Clears all key-value pairs from the builder, resetting its state.knownSize: Returns the current size of the map being built.result: Finalizes the construction and produces an immutableChunkMapinstance.sizeHint: Provides a size hint to optimize internal storage for a specified number of elements.
Attributes
- Constructor
-
Initializes the builder with a specified initial capacity for internal buffers.
- Source
- ChunkMap.scala
- Supertypes
Represents an immutable map with indexed access, implemented on top of a ChunkMap.
Represents an immutable map with indexed access, implemented on top of a ChunkMap.
This class provides efficient indexed access to keys and values within the underlying ChunkMap, while also exposing standard map operations. Internally, it maintains an index for fast key lookup.
Type parameters
- K
-
the type of keys in the map
- V
-
the type of values in the map
Value parameters
- underlying
-
the
ChunkMapserving as the backing storage for the map
Attributes
- Constructor
-
Creates a new
Indexedmap from the givenChunkMap. - Source
- ChunkMap.scala
- Supertypes
-
trait Serializableclass AbstractMap[K, V]trait Map[K, V]trait MapOps[K, V, Map, Map[K, V]]trait Iterable[(K, V)]class AbstractMap[K, V]trait Map[K, V]trait Puretrait Equalstrait MapFactoryDefaults[K, V, Map, Iterable]trait MapOps[K, V, Map, Map[K, V]]trait PartialFunction[K, V]trait K => Vclass AbstractIterable[(K, V)]trait Iterable[(K, V)]trait IterableFactoryDefaults[(K, V), Iterable]trait IterableOps[(K, V), Iterable, Map[K, V]]trait IterableOnceOps[(K, V), Iterable, Map[K, V]]trait IterableOnce[(K, V)]class Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
Constructs a ChunkMap from a sequence of key-value pairs.
Constructs a ChunkMap from a sequence of key-value pairs.
Attributes
- Definition Classes
-
MapFactory
- Source
- ChunkMap.scala
Returns an empty instance of ChunkMap.
Constructs a ChunkMap from an IterableOnce of key-value pairs.
Constructs a ChunkMap from an IterableOnce of key-value pairs.
Attributes
- Definition Classes
-
MapFactory
- Source
- ChunkMap.scala
Creates a ChunkMap from a Chunk of key-value pairs, handling duplicate keys by keeping the last value for each key (preserving the position of the first occurrence).
Creates a ChunkMap from a Chunk of key-value pairs, handling duplicate keys by keeping the last value for each key (preserving the position of the first occurrence).
Attributes
- Source
- ChunkMap.scala
Creates a ChunkMap from parallel Chunks of keys and values.
Creates a ChunkMap from parallel Chunks of keys and values.
Precondition: The keys must not contain duplicate elements. If duplicate keys are present, the behavior is undefined (lookups may return any of the duplicate values). Use from() or the builder if duplicate handling is needed.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if keys and values have different lengths
- Source
- ChunkMap.scala
Creates a new builder for constructing a ChunkMap from key-value pairs.
Creates a new builder for constructing a ChunkMap from key-value pairs.
Attributes
- Definition Classes
-
MapFactory
- Source
- ChunkMap.scala
Implicits
Inherited implicits
The default Factory instance for maps.
The default Factory instance for maps.
Type parameters
- K
-
the type of the keys
- V
-
the type of the values
Attributes
- Inherited from:
- MapFactory
- Source
- Factory.scala