Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 751 for element (0.32 sec)

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

      // Query Operations
    
      /**
       * Returns the number of occurrences of {@code element} in this multiset.
       *
       * @param element the element to look for
       * @return the nonnegative number of occurrences of the element
       */
      @Override
      public int count(@CheckForNull Object element) {
        AtomicInteger existingCounter = Maps.safeGet(countMap, element);
        return (existingCounter == null) ? 0 : existingCounter.get();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ForwardingListIterator.java

      /** Constructor for use by subclasses. */
      protected ForwardingListIterator() {}
    
      @Override
      protected abstract ListIterator<E> delegate();
    
      @Override
      public void add(@ParametricNullness E element) {
        delegate().add(element);
      }
    
      @Override
      public boolean hasPrevious() {
        return delegate().hasPrevious();
      }
    
      @Override
      public int nextIndex() {
        return delegate().nextIndex();
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ForwardingQueue.java

        }
      }
    
      /**
       * A sensible definition of {@link #peek} in terms of {@link #element}. If you override {@link
       * #element}, you may wish to override {@link #peek} to forward to this implementation.
       *
       * @since 7.0
       */
      @CheckForNull
      protected E standardPeek() {
        try {
          return element();
        } catch (NoSuchElementException caught) {
          return null;
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 4.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/SortedLists.java

         * {@code list.size()} if there is no such element.
         *
         * <p>Note that the return value will be {@code >= 0} if and only if there is an element of the
         * list that compares as equal to the key.
         *
         * <p>This is equivalent to the behavior of {@link java.util.Collections#binarySearch(List,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java

      public void testHashCode_containingNull() {
        Collection<E> elements = getSampleElements(getNumElements() - 1);
        int expectedHashCode = 0;
        for (E element : elements) {
          expectedHashCode += ((element == null) ? 0 : element.hashCode());
        }
    
        elements.add(null);
        collection = getSubjectGenerator().create(elements.toArray());
        assertEquals(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

          for (int i = 0; i < 100; i++) {
            Element element = Element.values()[random.nextInt(range)];
            elements.add(element);
            queue.add(element);
          }
          Iterator<Element> queueIterator = queue.iterator();
          int remaining = queue.size();
          while (queueIterator.hasNext()) {
            Element element = queueIterator.next();
            remaining--;
    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)
  7. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

        if (occurrences == 0) {
          return count(element);
        }
        checkArgument(occurrences > 0, "occurrences cannot be negative: %s", occurrences);
        int entryIndex = backingMap.indexOf(element);
        if (entryIndex == -1) {
          backingMap.put(element, occurrences);
          size += occurrences;
          return 0;
        }
        int oldCount = backingMap.getValue(entryIndex);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/collect/MapBenchmark.java

        Hash {
          @Override
          Map<Element, Element> create(Collection<Element> keys) {
            Map<Element, Element> map = Maps.newHashMap();
            for (Element element : keys) {
              map.put(element, element);
            }
            return map;
          }
        },
        LinkedHM {
          @Override
          Map<Element, Element> create(Collection<Element> keys) {
            Map<Element, Element> map = Maps.newLinkedHashMap();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/testers/ListRemoveTester.java

        collection = getSubjectGenerator().create(arrayAndDuplicate.elements);
        E duplicate = arrayAndDuplicate.duplicate;
    
        int firstIndex = getList().indexOf(duplicate);
        int initialSize = getList().size();
        assertTrue("remove(present) should return true", getList().remove(duplicate));
        assertTrue(
            "After remove(duplicate), a list should still contain the duplicate element",
            getList().contains(duplicate));
        assertFalse(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 2.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

            double partition = array[from + 1]; // Choose partitioning element.
            while (true) {
              // Skip the elements smaller than the partition.
              do {
                low++;
              } while (array[low] < partition);
    
              // Skip the elements larger than the partition.
              do {
                high--;
              } while (array[high] > partition);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
Back to top