Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 782 for Wong (0.15 sec)

  1. android/guava/src/com/google/common/io/ByteSource.java

        }
      }
    
      /** A view of a subsection of the containing byte source. */
      private final class SlicedByteSource extends ByteSource {
    
        final long offset;
        final long length;
    
        SlicedByteSource(long offset, long length) {
          checkArgument(offset >= 0, "offset (%s) may not be negative", offset);
          checkArgument(length >= 0, "length (%s) may not be negative", length);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/Striped64.java

       * provided.
       */
      static final class Cell {
        volatile long p0, p1, p2, p3, p4, p5, p6;
        volatile long value;
        volatile long q0, q1, q2, q3, q4, q5, q6;
    
        Cell(long x) {
          value = x;
        }
    
        final boolean cas(long cmp, long val) {
          return UNSAFE.compareAndSwapLong(this, valueOffset, cmp, val);
        }
    
        // Unsafe mechanics
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/StatsTest.java

        assertThat(LONG_MANY_VALUES_STATS_ITERATOR.sum())
            .isWithin(ALLOWED_ERROR * LONG_MANY_VALUES_MEAN)
            .of(LONG_MANY_VALUES_MEAN * LONG_MANY_VALUES_COUNT);
        assertThat(LONG_MANY_VALUES_STATS_SNAPSHOT.sum())
            .isWithin(ALLOWED_ERROR * LONG_MANY_VALUES_MEAN)
            .of(LONG_MANY_VALUES_MEAN * LONG_MANY_VALUES_COUNT);
      }
    
      public void testPopulationVariance() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 32.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/IntsTest.java

            .isNull();
        assertWithMessage("Max long").that(Ints.tryParse(Long.toString(Long.MAX_VALUE))).isNull();
        assertWithMessage("Min long").that(Ints.tryParse(Long.toString(Long.MIN_VALUE))).isNull();
        assertThat(Ints.tryParse("\u0662\u06f3")).isNull();
      }
    
      /**
       * Applies {@link Ints#tryParse(String)} to the given string and asserts that the result is as
       * expected.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 28.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/LongMathTest.java

        assertMean(0, 0, 0);
        assertMean(-1, -1, -1);
        assertMean(Long.MIN_VALUE, Long.MIN_VALUE, Long.MIN_VALUE);
        assertMean(Long.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE);
    
        // Exhaustive checks
        for (long x : ALL_LONG_CANDIDATES) {
          for (long y : ALL_LONG_CANDIDATES) {
            assertMean(x, y);
          }
        }
      }
    
      /** Helper method that asserts the arithmetic mean of x and y is equal to the expectedMean. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        testSort(new long[] {2}, 0, 1, new long[] {2});
        testSort(new long[] {2, 1, 0}, 0, 2, new long[] {1, 2, 0});
        testSort(new long[] {2, GREATEST, 1, LEAST}, 1, 4, new long[] {2, LEAST, 1, GREATEST});
      }
    
      public void testSortDescending() {
        testSortDescending(new long[] {}, new long[] {});
        testSortDescending(new long[] {1}, new long[] {1});
        testSortDescending(new long[] {1, 2}, new long[] {2, 1});
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/primitives/LongsTest.java

            .isEqualTo(1);
        assertThat(
                Longs.indexOf(
                    new long[] {(long) 2, (long) 3, (long) 2, (long) 3, (long) 4, (long) 2, (long) 3},
                    new long[] {(long) 2, (long) 3, (long) 4}))
            .isEqualTo(2);
        assertThat(
                Longs.indexOf(
                    new long[] {(long) 2, (long) 2, (long) 3, (long) 4, (long) 2, (long) 3, (long) 4},
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/primitives/LongsTest.java

            .isEqualTo(1);
        assertThat(
                Longs.indexOf(
                    new long[] {(long) 2, (long) 3, (long) 2, (long) 3, (long) 4, (long) 2, (long) 3},
                    new long[] {(long) 2, (long) 3, (long) 4}))
            .isEqualTo(2);
        assertThat(
                Longs.indexOf(
                    new long[] {(long) 2, (long) 2, (long) 3, (long) 4, (long) 2, (long) 3, (long) 4},
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/ByteStreams.java

       * happens first. Returns the total number of bytes skipped.
       */
      static long skipUpTo(InputStream in, long n) throws IOException {
        long totalSkipped = 0;
        // A buffer is allocated if skipSafely does not skip any bytes.
        byte[] buf = null;
    
        while (totalSkipped < n) {
          long remaining = n - totalSkipped;
          long skipped = skipSafely(in, remaining);
    
          if (skipped == 0) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

      public void testCheckedCast() {
        for (long value : UNSIGNED_INTS) {
          assertThat(UnsignedInts.toLong(UnsignedInts.checkedCast(value))).isEqualTo(value);
        }
        assertCastFails(1L << 32);
        assertCastFails(-1L);
        assertCastFails(Long.MAX_VALUE);
        assertCastFails(Long.MIN_VALUE);
      }
    
      private static void assertCastFails(long value) {
        try {
          UnsignedInts.checkedCast(value);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
Back to top