Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for We (0.13 sec)

  1. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

              // We're careful to put only K instances in.
              K[] sortedKs = (K[]) sortedKeys;
              Arrays.sort(sortedKs, comparator);
              Object[] sortedValues = new Object[size];
    
              // We might, somehow, be able to reorder values in-place.  But it doesn't seem like
              // there's a way around creating the separate sortedKeys array, and if we're allocating
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Preconditions.java

       */
      public static void checkState(
          boolean expression,
          /*
           * TODO(cpovirk): Consider removing @CheckForNull here, as we've done with the other methods'
           * errorMessageTemplate parameters: It is unlikely that callers intend for their string
           * template to be null (though we do handle that case gracefully at runtime). I've left this
           * one as it is because one of our users has defined a wrapper API around Preconditions,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 11 11:52:14 GMT 2024
    - 52.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

        // don't execute 'immediately'.  By checking isDone here we avoid that.
        // A corollary to all that is that we don't need to check isDone inside the loop because if we
        // get into the loop we know that we weren't done when we entered and therefore we aren't under
        // an obligation to execute 'immediately'.
        if (!isDone()) {
          Listener oldHead = listeners;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

        assertEquals(1, callCount.get());
        for (int i = 0; i < count; i++) {
          // doConcurrentGet alternates between calling getUnchecked and calling get. If we call get(),
          // we should get an ExecutionException; if we call getUnchecked(), we should get an
          // UncheckedExecutionException.
          int mod = i % 3;
          if (mod == 0 || mod == 2) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

          if (oldCapacity >= MAXIMUM_CAPACITY) {
            return;
          }
    
          /*
           * Reclassify nodes in each list to new Map. Because we are using power-of-two expansion, the
           * elements from each bin must either stay at same index, or move with a power of two offset.
           * We eliminate unnecessary node creation by catching cases where old nodes can be reused
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Sets.java

          // Warning: this is broken if size() == 0, so it is critical that we
          // substitute an empty ImmutableSet to the user in place of this
    
          // It's a weird formula, but tests prove it works.
          int adjust = size() - 1;
          for (int i = 0; i < axes.size(); i++) {
            adjust *= 31;
            adjust = ~~adjust;
            // in GWT, we have to deal with integer overflow carefully
          }
          int hash = 1;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/CharMatcher.java

      }
    
      private static final int DISTINCT_CHARS = Character.MAX_VALUE - Character.MIN_VALUE + 1;
    
      /**
       * This is the actual implementation of {@link #precomputed}, but we bounce calls through a method
       * on {@link Platform} so that we can have different behavior in GWT.
       *
       * <p>This implementation tries to be smart in a number of ways. It recognizes cases where the
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 53.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/SetsTest.java

          fail("Expected IAE");
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCartesianProduct_hashCode() {
        // Run through the same cartesian products we tested above
    
        Set<List<Integer>> degenerate = Sets.cartesianProduct();
        checkHashCode(degenerate);
    
        checkHashCode(Sets.cartesianProduct(set(1, 2)));
    
    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)
  9. guava-tests/test/com/google/common/collect/IteratorsTest.java

        }
      }
    
      private static Iterator<Integer> iterateOver(int... values) {
        // Note: Ints.asList's iterator does not support remove which we need for testing.
        return new ArrayList<>(Ints.asList(values)).iterator();
      }
    
      public void testElementsEqual() {
        Iterable<?> a;
        Iterable<?> b;
    
        // Base case.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/MapsTest.java

        SortedMap<String, Double> transformed = transformValues(map, SQRT_FUNCTION);
    
        /*
         * We'd like to sanity check that we didn't get a NavigableMap out, but we
         * can't easily do so while maintaining GWT compatibility.
         */
        assertEquals(ImmutableSortedMap.of("a", 2.0, "b", 3.0), transformed);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 67.2K bytes
    - Viewed (0)
Back to top