Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 48 of 48 for ok (0.13 sec)

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

          // computed from that capacity. Because the internal table is only allocated on the first
          // write, we won't see copying because of the new threshold. So it is always OK to use the
          // calculation here.
          return (int) Math.ceil(expectedSize / 0.75);
        }
        return Integer.MAX_VALUE; // any large value
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 159.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

        } catch (IllegalStateException e) {
          /* expected */
        }
    
        assertEquals(
            "After remove() throws exception, peek should still be ok", "B", peekingIterator.peek());
    
        /* Should recover to be able to remove() after next(). */
        assertEquals("B", peekingIterator.next());
        peekingIterator.remove();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

       */
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public boolean offer(E e) {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          boolean ok = q.offer(e);
          if (!ok) {
            throw new AssertionError();
          }
          return true;
        } finally {
          monitor.leave();
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

      }
    
      public void testRemove_noneRemaining() {
        int countToRemove = 30;
        AtomicInteger current = new AtomicInteger(countToRemove);
    
        when(backingMap.get(KEY)).thenReturn(current);
        // it's ok if removal fails: another thread may have done the remove
        when(backingMap.remove(KEY, current)).thenReturn(false);
    
        assertEquals(countToRemove, multiset.remove(KEY, countToRemove));
        assertEquals(0, current.get());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

       * GWT SortedMap implementation that we delegate to throws
       * NullPointerException if the comparator does. Since our construction
       * methods ensure that null is never present in the map, it's OK for the
       * comparator to look for it wherever it wants.
       *
       * Note that we do NOT touch the comparator returned by comparator(), which
       * should be identical to the one the user passed in. We touch only the
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/testing/NullPointerTester.java

           * NullPointerTester tests that they have.
           */
          ignoredMembers.add(Converter.class.getMethod("apply", Object.class));
        } catch (NoSuchMethodException shouldBeImpossible) {
          // OK, fine: If it doesn't exist, then there's chance that we're going to be asked to test it.
        }
      }
    
      /**
       * Sets a default value that can be used for any parameter of type {@code type}. Returns this
       * object.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 22.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/reflect/InvokableTest.java

              publicMethodSignatures(genericDeclaration, ImmutableSet.<String>of());
          assertThat(invokableMethods).containsAtLeastElementsIn(genericDeclarationMethods);
        } catch (ClassNotFoundException e) {
          // OK: we're on Java 7, which doesn't have this class
        }
      }
    
      private static ImmutableSet<String> publicMethodSignatures(
          Class<?> c, ImmutableSet<String> ignore) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

         * value in the map is the number of occurrences of the key.
         */
        SortedMap<Integer, AtomicInteger> replica = Maps.newTreeMap();
        assertTrue("Empty heap should be OK", mmHeap.isIntact());
        for (int i = 0; i < heapSize; i++) {
          int randomInt = random.nextInt();
          mmHeap.offer(randomInt);
          insertIntoReplica(replica, randomInt);
        }
        assertIntact(mmHeap);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
Back to top