Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for init (0.15 sec)

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

        assertTrue(enumer.hasMoreElements());
        assertEquals(1, (int) enumer.nextElement());
        assertTrue(enumer.hasMoreElements());
        assertEquals(2, (int) enumer.nextElement());
        assertTrue(enumer.hasMoreElements());
        assertEquals(3, (int) enumer.nextElement());
        assertFalse(enumer.hasMoreElements());
      }
    
      private static Enumeration<Integer> enumerate(int... ints) {
    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)
  2. guava-tests/test/com/google/common/collect/SetsTest.java

      }
    
      private static Object objectWithHashCode(final int hashCode) {
        return new Object() {
          @Override
          public int hashCode() {
            return hashCode;
          }
        };
      }
    
      // TODO b/327389044 - `Set<? extends Object> elements` should be enough but J2KT needs the <E>
      private static <E> void assertPowerSetHashCode(int expected, Set<E> elements) {
    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)
  3. android/guava/src/com/google/common/base/Preconditions.java

       */
      public static void checkPositionIndexes(int start, int end, int size) {
        // Carefully optimized for execution by hotspot (explanatory comment above)
        if (start < 0 || end < start || end > size) {
          throw new IndexOutOfBoundsException(badPositionIndexes(start, end, size));
        }
      }
    
      private static String badPositionIndexes(int start, int end, int size) {
        if (start < 0 || start > size) {
    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)
  4. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

            CacheBuilder.newBuilder().weakValues().build(countingLoader);
        ConcurrentMap<Object, Object> map = cache.asMap();
    
        int iterations = 10;
        WeakReference<Object> ref = new WeakReference<>(null);
        int expectedComputations = 0;
        for (int i = 0; i < iterations; i++) {
          // The entry should get garbage collected and recomputed.
          Object oldValue = ref.get();
          if (oldValue == null) {
    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/ImmutableSortedMap.java

        }
    
        private Builder(Comparator<? super K> comparator, int initialCapacity) {
          this.comparator = checkNotNull(comparator);
          this.keys = new @Nullable Object[initialCapacity];
          this.values = new @Nullable Object[initialCapacity];
        }
    
        private void ensureCapacity(int minCapacity) {
          if (minCapacity > keys.length) {
    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)
  6. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

      @ParametricNullness
      public V get(long timeout, TimeUnit unit)
          throws InterruptedException, TimeoutException, ExecutionException {
        // NOTE: if timeout < 0, remainingNanos will be < 0 and we will fall into the while(true) loop
        // at the bottom and throw a timeoutexception.
        final long timeoutNanos = unit.toNanos(timeout); // we rely on the implicit null check on unit.
        long remainingNanos = timeoutNanos;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/CharMatcher.java

        }
    
        @Override
        public int indexIn(CharSequence sequence) {
          return (sequence.length() == 0) ? -1 : 0;
        }
    
        @Override
        public int indexIn(CharSequence sequence, int start) {
          int length = sequence.length();
          checkPositionIndex(start, length);
          return (start == length) ? -1 : start;
        }
    
        @Override
        public int lastIndexIn(CharSequence sequence) {
    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. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

      E copyEntry(E original, E newNext) {
        int hash = original.getHash();
        return segmentFor(hash).copyEntry(original, newNext);
      }
    
      int hash(Object key) {
        int h = keyEquivalence.hash(key);
        return rehash(h);
      }
    
      void reclaimValue(WeakValueReference<K, V, E> valueReference) {
        E entry = valueReference.getEntry();
        int hash = entry.getHash();
    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)
  9. guava-tests/test/com/google/common/reflect/TypeTokenTest.java

            TypeToken.of(StringListIterable[].class).getSupertype(Iterable[].class));
        assertEquals(int[].class, TypeToken.of(int[].class).getSupertype(int[].class).getType());
        assertEquals(Object.class, TypeToken.of(int[].class).getSupertype(Object.class).getType());
        assertEquals(int[][].class, TypeToken.of(int[][].class).getSupertype(int[][].class).getType());
        assertEquals(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 88.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Sets.java

          }
          return false;
        }
    
        @Override
        public int hashCode() {
          // 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;
    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)
Back to top