Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for toInt (0.15 sec)

  1. android/guava/src/com/google/common/hash/Murmur3_128HashFunction.java

            case 15:
              k2 ^= (long) toInt(bb.get(14)) << 48; // fall through
            case 14:
              k2 ^= (long) toInt(bb.get(13)) << 40; // fall through
            case 13:
              k2 ^= (long) toInt(bb.get(12)) << 32; // fall through
            case 12:
              k2 ^= (long) toInt(bb.get(11)) << 24; // fall through
            case 11:
              k2 ^= (long) toInt(bb.get(10)) << 16; // fall through
            case 10:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.6K 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. 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)
  5. android/guava/src/com/google/common/io/ReaderInputStream.java

      }
    
      @Override
      public void close() throws IOException {
        reader.close();
      }
    
      @Override
      public int read() throws IOException {
        return (read(singleByte) == 1) ? UnsignedBytes.toInt(singleByte[0]) : -1;
      }
    
      // TODO(chrisn): Consider trying to encode/flush directly to the argument byte
      // buffer when possible.
      @Override
      public int read(byte[] b, int off, int len) throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

    package com.google.common.hash;
    
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.primitives.UnsignedBytes.toInt;
    
    import com.google.common.base.Charsets;
    import com.google.common.primitives.Chars;
    import com.google.common.primitives.Ints;
    import com.google.common.primitives.Longs;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/eventbus/EventBusTest.java

            });
    
        bus.post("hello");
    
        assertEquals(1, calls.get());
      }
    
      public void testPrimitiveSubscribeFails() {
        class SubscribesToPrimitive {
          @Subscribe
          public void toInt(int i) {}
        }
        assertThrows(IllegalArgumentException.class, () -> bus.register(new SubscribesToPrimitive()));
      }
    
      /** Records thrown exception information. */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

            });
    
        bus.post("hello");
    
        assertEquals(1, calls.get());
      }
    
      public void testPrimitiveSubscribeFails() {
        class SubscribesToPrimitive {
          @Subscribe
          public void toInt(int i) {}
        }
        assertThrows(IllegalArgumentException.class, () -> bus.register(new SubscribesToPrimitive()));
      }
    
      /** Records thrown exception information. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        private class In extends InputStream {
          private int pos;
    
          @Override
          public int read() throws IOException {
            byte[] b = new byte[1];
            return read(b) == -1 ? -1 : UnsignedBytes.toInt(b[0]);
          }
    
          @Override
          public int read(byte[] b, int off, int len) {
            if (pos >= bytes.length) {
              return -1;
            }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/ByteSourceTest.java

        private class In extends InputStream {
          private int pos;
    
          @Override
          public int read() throws IOException {
            byte[] b = new byte[1];
            return read(b) == -1 ? -1 : UnsignedBytes.toInt(b[0]);
          }
    
          @Override
          public int read(byte[] b, int off, int len) {
            if (pos >= bytes.length) {
              return -1;
            }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
Back to top