Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 690 for removeAt (0.17 sec)

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

        }
      }
    
      // Returned from removeAt() to iterator.remove()
      static class MoveDesc<E> {
        final E toTrickle;
        final E replaced;
    
        MoveDesc(E toTrickle, E replaced) {
          this.toTrickle = toTrickle;
          this.replaced = replaced;
        }
      }
    
      /** Removes and returns the value at {@code index}. */
      private E removeAndGet(int index) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        assertTrue("Could not remove larry", mmHeap.remove("larry"));
        assertEquals(6, mmHeap.size());
        assertFalse("heap contains larry which has been removed", mmHeap.contains("larry"));
        assertTrue("heap does not contain sergey", mmHeap.contains("sergey"));
        assertTrue("Could not remove larry", mmHeap.removeAll(Lists.newArrayList("sergey", "eric")));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        E x = items[takeIndex];
        items[takeIndex] = null;
        takeIndex = inc(takeIndex);
        --count;
        return x;
      }
    
      /**
       * Utility for remove and iterator.remove: Delete item at position i. Call only when occupying
       * monitor.
       */
      void removeAt(int i) {
        final E[] items = this.items;
        // if removing front item, just advance
        if (i == takeIndex) {
          items[takeIndex] = null;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        E x = items[takeIndex];
        items[takeIndex] = null;
        takeIndex = inc(takeIndex);
        --count;
        return x;
      }
    
      /**
       * Utility for remove and iterator.remove: Delete item at position i. Call only when occupying
       * monitor.
       */
      void removeAt(int i) {
        final E[] items = this.items;
        // if removing front item, just advance
        if (i == takeIndex) {
          items[takeIndex] = null;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        assertTrue("Could not remove larry", mmHeap.remove("larry"));
        assertEquals(6, mmHeap.size());
        assertFalse("heap contains larry which has been removed", mmHeap.contains("larry"));
        assertTrue("heap does not contain sergey", mmHeap.contains("sergey"));
        assertTrue("Could not remove larry", mmHeap.removeAll(Lists.newArrayList("sergey", "eric")));
    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)
  6. android/guava/src/com/google/common/collect/Iterables.java

       * removeFrom.removeIf(predicate)} instead.
       *
       * @param removeFrom the iterable to (potentially) remove elements from
       * @param predicate a predicate that determines whether an element should be removed
       * @return {@code true} if any elements were removed from the iterable
       * @throws UnsupportedOperationException if the iterable does not support {@code remove()}.
       * @since 2.0
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

          }
        }
      }
    
      private void compareResultsForThisListOfStimuli() {
        int removes = Collections.frequency(Arrays.asList(stimuli), remove);
        if ((!features.contains(IteratorFeature.SUPPORTS_REMOVE) && removes > 1)
            || (stimuli.length >= 5 && removes > 2)) {
          // removes are the most expensive thing to test, since they often throw exceptions with stack
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveIfTester.java

      @CollectionFeature.Require(SUPPORTS_ITERATOR_REMOVE)
      public void testRemoveIf_alwaysFalse() {
        assertFalse("removeIf(x -> false) should return false", collection.removeIf(x -> false));
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_ITERATOR_REMOVE)
      @CollectionSize.Require(absent = ZERO)
      public void testRemoveIf_sometimesTrue() {
        assertTrue(
            "removeIf(isEqual(present)) should return true",
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/HashBiMap.java

          K key = keys[entry];
          removeEntryValueHashKnown(entry, valueHash);
          return key;
        }
      }
    
      /** Removes the entry at the specified index with no additional data. */
      void removeEntry(int entry) {
        removeEntryKeyHashKnown(entry, Hashing.smearedHash(keys[entry]));
      }
    
      /** Removes the entry at the specified index, given the hash of its key and value. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 36.4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/Collections2.java

        }
    
        @Override
        public boolean remove(@CheckForNull Object element) {
          return contains(element) && unfiltered.remove(element);
        }
    
        @Override
        public boolean removeAll(final Collection<?> collection) {
          return removeIf(collection::contains);
        }
    
        @Override
        public boolean retainAll(final Collection<?> collection) {
          return removeIf(element -> !collection.contains(element));
        }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
Back to top