Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for toInt (0.21 sec)

  1. guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

      public void testToInt() {
        assertThat(UnsignedBytes.toInt((byte) 0)).isEqualTo(0);
        assertThat(UnsignedBytes.toInt((byte) 1)).isEqualTo(1);
        assertThat(UnsignedBytes.toInt((byte) 127)).isEqualTo(127);
        assertThat(UnsignedBytes.toInt((byte) -128)).isEqualTo(128);
        assertThat(UnsignedBytes.toInt((byte) -127)).isEqualTo(129);
        assertThat(UnsignedBytes.toInt((byte) -1)).isEqualTo(255);
      }
    
      public void testCheckedCast() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

      public void testToInt() {
        assertThat(UnsignedBytes.toInt((byte) 0)).isEqualTo(0);
        assertThat(UnsignedBytes.toInt((byte) 1)).isEqualTo(1);
        assertThat(UnsignedBytes.toInt((byte) 127)).isEqualTo(127);
        assertThat(UnsignedBytes.toInt((byte) -128)).isEqualTo(128);
        assertThat(UnsignedBytes.toInt((byte) -127)).isEqualTo(129);
        assertThat(UnsignedBytes.toInt((byte) -1)).isEqualTo(255);
      }
    
      public void testCheckedCast() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/primitives/UnsignedBytes.java

       * @return a negative value if {@code a} is less than {@code b}; a positive value if {@code a} is
       *     greater than {@code b}; or zero if they are equal
       */
      public static int compare(byte a, byte b) {
        return toInt(a) - toInt(b);
      }
    
      /**
       * Returns the least value present in {@code array}, treating values as unsigned.
       *
       * @param array a <i>nonempty</i> array of {@code byte} values
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 18.3K bytes
    - Viewed (0)
  4. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirAnnotationValueConverter.kt

                type.isInt -> KtConstantValue.KtIntConstantValue((value as Number).toInt(), expression)
                type.isUInt -> KtConstantValue.KtUnsignedIntConstantValue((value as Number).toInt().toUInt(), expression)
                type.isLong -> KtConstantValue.KtLongConstantValue((value as Number).toLong(), expression)
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Apr 25 07:15:56 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  5. settings.gradle.kts

      val ideaVersionString = System.getProperty("idea.version") ?: return false
    
      return try {
        val (major, minor, _) = ideaVersionString.split(".", limit = 3)
        KotlinVersion(major.toInt(), minor.toInt()) < KotlinVersion(2023, 2)
      } catch (e: Exception) {
        false // Unknown version, presumably compatible.
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Apr 14 14:24:05 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

      ) {
        this.withLock {
          if (closed) throw IOException("closed")
          hpackWriter.writeHeaders(requestHeaders)
    
          val byteCount = hpackBuffer.size
          val length = minOf(maxFrameSize - 4L, byteCount).toInt()
          frameHeader(
            streamId = streamId,
            length = length + 4,
            type = TYPE_PUSH_PROMISE,
            flags = if (byteCount == length.toLong()) FLAG_END_HEADERS else 0,
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

            } else {
              end = outBytes.size.toLong()
              truncated = nextOutFrame.truncated
            }
    
            // Write a frame.
            val length = (end - start).toInt()
            outputStream.write(outBytes, start.toInt(), length)
    
            // If the last frame was truncated, immediately close the connection.
            if (truncated) {
              socket.close()
            }
          } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. container-tests/build.gradle.kts

    plugins {
      kotlin("jvm")
    }
    
    val platform = System.getProperty("okhttp.platform", "jdk9")
    val testJavaVersion = System.getProperty("test.java.version", "21").toInt()
    
    tasks.withType<Test> {
      useJUnitPlatform()
      onlyIf("By default not in CI") {
        System.getenv("CI") == null
          || (project.hasProperty("containerTests") && project.property("containerTests").toString().toBoolean())
      }
    
      jvmArgs(
        "-Dokhttp.platform=$platform",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 17 14:46:34 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Cookie.kt

              hour == -1 && matcher.usePattern(TIME_PATTERN).matches() -> {
                hour = matcher.group(1).toInt()
                minute = matcher.group(2).toInt()
                second = matcher.group(3).toInt()
              }
              dayOfMonth == -1 && matcher.usePattern(DAY_OF_MONTH_PATTERN).matches() -> {
                dayOfMonth = matcher.group(1).toInt()
              }
              month == -1 && matcher.usePattern(MONTH_PATTERN).matches() -> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  10. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirCompileTimeConstantEvaluator.kt

    
                ConstantValueKind.IntegerLiteral -> {
                    val long = value as Long
                    if (Int.MIN_VALUE < long && long < Int.MAX_VALUE) KtConstantValue.KtIntConstantValue(long.toInt(), psi)
                    else KtConstantValue.KtLongConstantValue(long, psi)
                }
    
                ConstantValueKind.UnsignedIntegerLiteral -> {
                    val long = value as ULong
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Wed Mar 20 14:53:27 GMT 2024
    - 16.5K bytes
    - Viewed (0)
Back to top