Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for readMapInto (0.3 sec)

  1. platforms/core-configuration/stdlib-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/stdlib/CollectionCodecs.kt

        },
        {
            @Suppress("unchecked_cast")
            val comparator = read() as Comparator<Any?>?
            readMapInto { TreeMap(comparator) }
        }
    )
    
    
    fun <T : MutableMap<Any?, Any?>> mapCodec(factory: (Int) -> T): Codec<T> = codec(
        { writeMap(it) },
        { readMapInto(factory) }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat May 25 20:43:52 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/Combinators.kt

    suspend fun WriteContext.writeMapEntries(value: Map<*, *>) {
        for (entry in value.entries) {
            write(entry.key)
            write(entry.value)
        }
    }
    
    
    suspend fun <T : MutableMap<Any?, Any?>> ReadContext.readMapInto(factory: (Int) -> T): T {
        val size = readSmallInt()
        val items = factory(size)
        readMapEntriesInto(items, size)
        return items
    }
    
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 12:59:39 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top