Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 69 for Difference (0.17 sec)

  1. guava-tests/test/com/google/common/collect/SynchronizedSetTest.java

     *
     * @author Mike Bostock
     */
    public class SynchronizedSetTest extends TestCase {
    
      public static final Object MUTEX = new Integer(1); // something Serializable
    
      // TODO(cpovirk): Resolve difference between branches in their choice of mutex:
      // - The mainline uses `null` (even since the change in cl/99720576 was integrated).
      // - The backport continued to use MUTEX.
      public static Test suite() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 11:19:47 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

      }
    
      public void testOneSecondBurst() {
        RateLimiter limiter = RateLimiter.create(5.0, stopwatch);
        stopwatch.sleepMillis(1000); // max capacity reached
        stopwatch.sleepMillis(1000); // this makes no difference
        limiter.acquire(1); // R0.00, since it's the first request
    
        limiter.acquire(1); // R0.00, from capacity
        limiter.acquire(3); // R0.00, from capacity
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MultisetsTest.java

        assertThat(Multisets.difference(ms1, ms2)).containsExactly("a", "b");
      }
    
      public void testDifferenceWithRemovedElement() {
        Multiset<String> ms1 = HashMultiset.create(Arrays.asList("a", "b", "a"));
        Multiset<String> ms2 = HashMultiset.create(Arrays.asList("b"));
        assertThat(Multisets.difference(ms1, ms2)).containsExactly("a", "a");
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/AbstractStreamingHasher.java

        // TODO(kevinb): check more preconditions (as bufferSize >= chunkSize) if this is ever public
        checkArgument(bufferSize % chunkSize == 0);
    
        // TODO(user): benchmark performance difference with longer buffer
        // always space for a single primitive
        this.buffer = ByteBuffer.allocate(bufferSize + 7).order(ByteOrder.LITTLE_ENDIAN);
        this.bufferSize = bufferSize;
        this.chunkSize = chunkSize;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

      }
    
      /**
       * This test creates a long random sequence of inputs, then a lot of differently configured sinks
       * process it; all should produce the same answer, the only difference should be the number of
       * process()/processRemaining() invocations, due to alignment.
       */
      @AndroidIncompatible // slow. TODO(cpovirk): Maybe just reduce iterations under Android.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Multisets.java

                  }
                }
                return endOfData();
              }
            };
          }
        };
      }
    
      /**
       * Returns an unmodifiable view of the difference of two multisets. In the returned multiset, the
       * count of each element is the result of the <i>zero-truncated subtraction</i> of its count in
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/SetsTest.java

                        set1.add(samples().e3());
                        Set<String> set2 = Sets.newHashSet(samples().e3());
                        return Sets.difference(set1, set2);
                      }
                    })
                .named("Sets.difference")
                .withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES)
                .createTestSuite());
    
        suite.addTest(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 49.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableRangeSet.java

      }
    
      /**
       * Returns a new range set consisting of the difference of this range set and {@code other}.
       *
       * <p>This is essentially the same as {@code TreeRangeSet.create(this).removeAll(other)} except it
       * returns an {@code ImmutableRangeSet}.
       *
       * @since 21.0
       */
      public ImmutableRangeSet<C> difference(RangeSet<C> other) {
        RangeSet<C> copy = TreeRangeSet.create(this);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 26.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

      }
    
      /**
       * Returns a new range set consisting of the difference of this range set and {@code other}.
       *
       * <p>This is essentially the same as {@code TreeRangeSet.create(this).removeAll(other)} except it
       * returns an {@code ImmutableRangeSet}.
       *
       * @since 21.0
       */
      public ImmutableRangeSet<C> difference(RangeSet<C> other) {
        RangeSet<C> copy = TreeRangeSet.create(this);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/IntMath.java

       */
      public static int checkedAdd(int a, int b) {
        long result = (long) a + b;
        checkNoOverflow(result == (int) result, "checkedAdd", a, b);
        return (int) result;
      }
    
      /**
       * Returns the difference of {@code a} and {@code b}, provided it does not overflow.
       *
       * @throws ArithmeticException if {@code a - b} overflows in signed {@code int} arithmetic
       */
      public static int checkedSubtract(int a, int b) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
Back to top