Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MappedRange (0.09 sec)

  1. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappedRange.kt

     * limitations under the License.
     */
    package okhttp3.internal.idn
    
    import kotlin.math.abs
    import okio.ByteString
    
    internal sealed interface MappedRange {
      val rangeStart: Int
    
      data class Constant(
        override val rangeStart: Int,
        val type: Int,
      ) : MappedRange {
        val b1: Int
          get() =
            when (type) {
              TYPE_IGNORED -> 119
              TYPE_VALID -> 120
              TYPE_DISALLOWED -> 121
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

                when (mapping.mappedTo.size) {
                  1 -> MappedRange.Inline1(rangeStart, mapping.mappedTo)
                  2 -> MappedRange.Inline2(rangeStart, mapping.mappedTo)
                  else -> MappedRange.External(rangeStart, mapping.mappedTo)
                }
              }
    
            TYPE_IGNORED, TYPE_VALID, TYPE_DISALLOWED -> {
              MappedRange.Constant(rangeStart, mapping.type)
            }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  3. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

            mutableListOf(
              InlineDelta(1, 5),
              InlineDelta(2, 5),
              InlineDelta(3, 5),
              MappedRange.External(4, "a".encodeUtf8()),
            ),
          ),
        ).containsExactly(
          InlineDelta(1, 5),
          MappedRange.External(4, "a".encodeUtf8()),
        )
      }
    
      @Test fun mergeAdjacentDeltaMappedRangesWithDifferentSizedDeltas() {
        assertThat(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top