Package-level declarations

Types

Link copied to clipboard
class MutableObjectFloatMap<K>(initialCapacity: Int = DefaultScatterCapacity) : ObjectFloatMap<K>

MutableObjectFloatMap is a container with a MutableMap-like interface for keys with reference types and Float primitives for values.

Link copied to clipboard
class MutableScatterMap<K, V>(initialCapacity: Int = DefaultScatterCapacity) : ScatterMap<K, V>

MutableScatterMap is a container with a Map-like interface based on a flat hash table implementation (the key/value mappings are not stored by nodes but directly into arrays). The underlying implementation is designed to avoid all allocations on insertion, removal, retrieval, and iteration. Allocations may still happen on insertion when the underlying storage needs to grow to accommodate newly added entries to the table. In addition, this implementation minimizes memory usage by avoiding the use of separate objects to hold key/value pairs.

Link copied to clipboard
class MutableScatterSet<E>(initialCapacity: Int = DefaultScatterCapacity) : ScatterSet<E>

MutableScatterSet is a container with a MutableSet-like interface based on a flat hash table implementation. The underlying implementation is designed to avoid all allocations on insertion, removal, retrieval, and iteration. Allocations may still happen on insertion when the underlying storage needs to grow to accommodate newly added elements to the set.

Link copied to clipboard
sealed class ObjectFloatMap<K>

ObjectFloatMap is a container with a Map-like interface for keys with reference types and Float primitives for values.

Link copied to clipboard
typealias ObjectList<T> = List<T>
Link copied to clipboard
sealed class ScatterMap<K, V>

ScatterMap is a container with a Map-like interface based on a flat hash table implementation (the key/value mappings are not stored by nodes but directly into arrays). The underlying implementation is designed to avoid all allocations on insertion, removal, retrieval, and iteration. Allocations may still happen on insertion when the underlying storage needs to grow to accommodate newly added entries to the table. In addition, this implementation minimizes memory usage by avoiding the use of separate objects to hold key/value pairs.

Link copied to clipboard
sealed class ScatterSet<E>

ScatterSet is a container with a Set-like interface based on a flat hash table implementation. The underlying implementation is designed to avoid all allocations on insertion, removal, retrieval, and iteration. Allocations may still happen on insertion when the underlying storage needs to grow to accommodate newly added elements to the set.

Functions

Link copied to clipboard

Returns an empty, read-only ObjectFloatMap.

Link copied to clipboard

Returns an empty, read-only ScatterMap.

Link copied to clipboard

Returns an empty, read-only ScatterSet.

Link copied to clipboard

Returns a new empty MutableObjectFloatMap.

Returns a new MutableObjectFloatMap with only key1 associated with value1.

fun <K> mutableObjectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float): MutableObjectFloatMap<K>

Returns a new MutableObjectFloatMap with only key1 and key2 associated with value1 and value2, respectively.

fun <K> mutableObjectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float, key3: K, value3: Float): MutableObjectFloatMap<K>

Returns a new MutableObjectFloatMap with only key1, key2, and key3 associated with value1, value2, and value3, respectively.

fun <K> mutableObjectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float, key3: K, value3: Float, key4: K, value4: Float): MutableObjectFloatMap<K>

Returns a new MutableObjectFloatMap with only key1, key2, key3, and key4 associated with value1, value2, value3, and value4, respectively.

fun <K> mutableObjectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float, key3: K, value3: Float, key4: K, value4: Float, key5: K, value5: Float): MutableObjectFloatMap<K>

Returns a new MutableObjectFloatMap with only key1, key2, key3, key4, and key5 associated with value1, value2, value3, value4, and value5, respectively.

Link copied to clipboard

Returns a new MutableScatterMap.

fun <K, V> mutableScatterMapOf(vararg pairs: Pair<K, V>): MutableScatterMap<K, V>

Returns a new MutableScatterMap with the specified contents, given as a list of pairs where the first component is the key and the second is the value. If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.

Link copied to clipboard

Returns a new MutableScatterSet.

Returns a new MutableScatterSet with only element1 in it.

fun <E> mutableScatterSetOf(vararg elements: E): MutableScatterSet<E>

Returns a new MutableScatterSet with the specified contents.

fun <E> mutableScatterSetOf(element1: E, element2: E): MutableScatterSet<E>

Returns a new MutableScatterSet with only element1 and element2 in it.

fun <E> mutableScatterSetOf(element1: E, element2: E, element3: E): MutableScatterSet<E>

Returns a new MutableScatterSet with only element1, element2, and element3 in it.

Link copied to clipboard

Returns an empty, read-only ObjectFloatMap.

Link copied to clipboard
fun <K> objectFloatMapOf(key1: K, value1: Float): ObjectFloatMap<K>

Returns a new ObjectFloatMap with only key1 associated with value1.

fun <K> objectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float): ObjectFloatMap<K>

Returns a new ObjectFloatMap with only key1 and key2 associated with value1 and value2, respectively.

fun <K> objectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float, key3: K, value3: Float): ObjectFloatMap<K>

Returns a new ObjectFloatMap with only key1, key2, and key3 associated with value1, value2, and value3, respectively.

fun <K> objectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float, key3: K, value3: Float, key4: K, value4: Float): ObjectFloatMap<K>

Returns a new ObjectFloatMap with only key1, key2, key3, and key4 associated with value1, value2, value3, and value4, respectively.

fun <K> objectFloatMapOf(key1: K, value1: Float, key2: K, value2: Float, key3: K, value3: Float, key4: K, value4: Float, key5: K, value5: Float): ObjectFloatMap<K>

Returns a new ObjectFloatMap with only key1, key2, key3, key4, and key5 associated with value1, value2, value3, value4, and value5, respectively.

Link copied to clipboard

Returns an empty, read-only ScatterSet.

fun <E> scatterSetOf(element1: E): ScatterSet<E>

Returns a new read-only ScatterSet with only element1 in it.

fun <E> scatterSetOf(vararg elements: E): ScatterSet<E>

Returns a new read-only ScatterSet with only elements in it.

fun <E> scatterSetOf(element1: E, element2: E): ScatterSet<E>

Returns a new read-only ScatterSet with only element1 and element2 in it.

fun <E> scatterSetOf(element1: E, element2: E, element3: E): ScatterSet<E>

Returns a new read-only ScatterSet with only element1, element2, and element3 in it.