Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for linearTimeSizeImpl (0.09 sec)

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

          implements Serializable {
        final Map<E, Integer> backingMap = Maps.newHashMap();
    
        @Override
        public int size() {
          return Multisets.linearTimeSizeImpl(this);
        }
    
        @Override
        public void clear() {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public int count(@Nullable Object element) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java

          implements Serializable {
        final Map<E, Integer> backingMap = Maps.newHashMap();
    
        @Override
        public int size() {
          return Multisets.linearTimeSizeImpl(this);
        }
    
        @Override
        public void clear() {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public int count(@Nullable Object element) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ForwardingMultiset.java

       * you override {@link #entrySet}, you may wish to override {@link #size} to forward to this
       * implementation.
       *
       * @since 7.0
       */
      protected int standardSize() {
        return Multisets.linearTimeSizeImpl(this);
      }
    
      /**
       * A sensible, albeit inefficient, definition of {@link #equals} in terms of {@code
       * entrySet().size()} and {@link #count}. If you override either of these methods, you may wish to
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ForwardingMultiset.java

       * you override {@link #entrySet}, you may wish to override {@link #size} to forward to this
       * implementation.
       *
       * @since 7.0
       */
      protected int standardSize() {
        return Multisets.linearTimeSizeImpl(this);
      }
    
      /**
       * A sensible, albeit inefficient, definition of {@link #equals} in terms of {@code
       * entrySet().size()} and {@link #count}. If you override either of these methods, you may wish to
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Multisets.java

          }
          totalCount--;
          canRemove = false;
        }
      }
    
      /** An implementation of {@link Multiset#size}. */
      static int linearTimeSizeImpl(Multiset<?> multiset) {
        long size = 0;
        for (Entry<?> entry : multiset.entrySet()) {
          size += entry.getCount();
        }
        return Ints.saturatedCast(size);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Multisets.java

                    & (Spliterator.ORDERED | Spliterator.NONNULL | Spliterator.IMMUTABLE)),
            multiset.size());
      }
    
      /** An implementation of {@link Multiset#size}. */
      static int linearTimeSizeImpl(Multiset<?> multiset) {
        long size = 0;
        for (Entry<?> entry : multiset.entrySet()) {
          size += entry.getCount();
        }
        return Ints.saturatedCast(size);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
Back to top