Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for getCount (0.21 sec)

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

         */
        @Override
        public boolean equals(@CheckForNull Object object) {
          if (object instanceof Multiset.Entry) {
            Multiset.Entry<?> that = (Multiset.Entry<?>) object;
            return this.getCount() == that.getCount()
                && Objects.equal(this.getElement(), that.getElement());
          }
          return false;
        }
    
        /**
         * Return this entry's hash code, following the behavior specified in {@link
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/RegularImmutableSortedMultiset.java

        this.offset = offset;
        this.length = length;
      }
    
      private int getCount(int index) {
        return (int) (cumulativeCounts[offset + index + 1] - cumulativeCounts[offset + index]);
      }
    
      @Override
      Entry<E> getEntry(int index) {
        return Multisets.immutableEntry(elementSet.asList().get(index), getCount(index));
      }
    
      @Override
      @CheckForNull
      public Entry<E> firstEntry() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/LocalCacheTest.java

        LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder());
        assertEquals(0, loader.getCount());
    
        Object key = new Object();
        Object value = map.get(key, loader);
        assertEquals(1, loader.getCount());
        assertEquals(value, map.get(key, loader));
        assertEquals(1, loader.getCount());
      }
    
      public void testRecordReadOnCompute() throws ExecutionException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 112.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

        LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder());
        assertEquals(0, loader.getCount());
    
        Object key = new Object();
        Object value = map.get(key, loader);
        assertEquals(1, loader.getCount());
        assertEquals(value, map.get(key, loader));
        assertEquals(1, loader.getCount());
      }
    
      public void testRecordReadOnCompute() throws ExecutionException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 110.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableMultiset.java

        public boolean contains(@CheckForNull Object o) {
          if (o instanceof Entry) {
            Entry<?> entry = (Entry<?>) o;
            if (entry.getCount() <= 0) {
              return false;
            }
            int count = count(entry.getElement());
            return count == entry.getCount();
          }
          return false;
        }
    
        @Override
        public int hashCode() {
          return ImmutableMultiset.this.hashCode();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableMultiset.java

        public boolean contains(@CheckForNull Object o) {
          if (o instanceof Entry) {
            Entry<?> entry = (Entry<?>) o;
            if (entry.getCount() <= 0) {
              return false;
            }
            int count = count(entry.getElement());
            return count == entry.getCount();
          }
          return false;
        }
    
        @Override
        public int hashCode() {
          return ImmutableMultiset.this.hashCode();
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/TreeMultiset.java

          @Override
          @ParametricNullness
          public E getElement() {
            return baseEntry.getElement();
          }
    
          @Override
          public int getCount() {
            int result = baseEntry.getCount();
            if (result == 0) {
              return count(getElement());
            } else {
              return result;
            }
          }
        };
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 34.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/EnumMultiset.java

            return new Multisets.AbstractEntry<E>() {
              @Override
              public E getElement() {
                return enumConstants[index];
              }
    
              @Override
              public int getCount() {
                return counts[index];
              }
            };
          }
        };
      }
    
      @Override
      public void forEachEntry(ObjIntConsumer<? super E> action) {
        checkNotNull(action);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

        long[] cumulativeCounts = new long[entries.size() + 1];
        int i = 0;
        for (Entry<E> entry : entries) {
          elementsBuilder.add(entry.getElement());
          cumulativeCounts[i + 1] = cumulativeCounts[i] + entry.getCount();
          i++;
        }
        return new RegularImmutableSortedMultiset<>(
            new RegularImmutableSortedSet<E>(elementsBuilder.build(), comparator),
            cumulativeCounts,
            0,
            entries.size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 35.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/EnumMultiset.java

            return new Multisets.AbstractEntry<E>() {
              @Override
              public E getElement() {
                return enumConstants[index];
              }
    
              @Override
              public int getCount() {
                return counts[index];
              }
            };
          }
        };
      }
    
      @Override
      public Iterator<E> iterator() {
        return Multisets.iteratorImpl(this);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top