Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 227 for County (0.2 sec)

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

    import javax.annotation.CheckForNull;
    
    /**
     * A mutable value of type {@code int}, for multisets to use in tracking counts of values.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    final class Count implements Serializable {
      private int value;
    
      Count(int value) {
        this.value = value;
      }
    
      public int get() {
        return value;
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Aug 05 00:40:25 GMT 2021
    - 1.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/EnumMultiset.java

      @Override
      public int setCount(E element, int count) {
        checkIsE(element);
        checkNonnegative(count, "count");
        int index = element.ordinal();
        int oldCount = counts[index];
        counts[index] = count;
        size += count - oldCount;
        if (oldCount == 0 && count > 0) {
          distinctElements++;
        } else if (oldCount > 0 && count == 0) {
          distinctElements--;
        }
        return oldCount;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

         * @throws IllegalArgumentException if {@code count} is negative
         */
        @CanIgnoreReturnValue
        @Override
        public Builder<E> setCount(E element, int count) {
          checkNotNull(element);
          CollectPreconditions.checkNonnegative(count, "count");
          maintenance();
          elements[length] = element;
          counts[length] = ~count;
          length++;
          return this;
        }
    
        /**
    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)
  4. android/guava/src/com/google/common/io/CountingOutputStream.java

      }
    
      /** Returns the number of bytes written. */
      public long getCount() {
        return count;
      }
    
      @Override
      public void write(byte[] b, int off, int len) throws IOException {
        out.write(b, off, len);
        count += len;
      }
    
      @Override
      public void write(int b) throws IOException {
        out.write(b);
        count++;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/TestingRemovalListeners.java

          add(notification);
        }
      }
    
      /**
       * {@link RemovalListener} that counts each {@link RemovalNotification} it receives, and provides
       * access to the most-recently received one.
       */
      static class CountingRemovalListener<K, V> implements RemovalListener<K, V> {
        private final AtomicInteger count = new AtomicInteger();
        private volatile RemovalNotification<K, V> lastNotification;
    
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

                  keys,
                  new Function<String, Integer>() {
                    @Override
                    public Integer apply(String key) {
                      return multiset.count(key);
                    }
                  });
          assertEquals("Counts not as expected", Ints.asList(deltas), actualCounts);
        } finally {
          pool.shutdownNow();
        }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

       * Returns a {@code new Object()} for every request, and increments a counter for every request.
       * The count is accessible via {@link #getCount}.
       */
      static class CountingLoader extends CacheLoader<Object, Object> {
        private final AtomicInteger count = new AtomicInteger();
    
        @Override
        public Object load(Object from) {
          count.incrementAndGet();
          return new Object();
        }
    
        public int getCount() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/AbstractCache.java

        /** Constructs an instance with all counts initialized to zero. */
        public SimpleStatsCounter() {}
    
        /** @since 11.0 */
        @Override
        public void recordHits(int count) {
          hitCount.add(count);
        }
    
        /** @since 11.0 */
        @Override
        public void recordMisses(int count) {
          missCount.add(count);
        }
    
        @SuppressWarnings("GoodTime") // b/122668874
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 9.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        AtomicInteger initial = new AtomicInteger(INITIAL_COUNT);
        when(backingMap.get(KEY)).thenReturn(initial);
    
        assertEquals(INITIAL_COUNT, multiset.add(KEY, COUNT_TO_ADD));
        assertEquals(INITIAL_COUNT + COUNT_TO_ADD, initial.get());
      }
    
      public void testAdd_laterFewWithOverflow() {
        final int INITIAL_COUNT = 92384930;
        final int COUNT_TO_ADD = Integer.MAX_VALUE - INITIAL_COUNT + 1;
    
    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)
  10. guava-tests/test/com/google/common/collect/CountTest.java

      }
    
      public void testAddAndGet() {
        Count holder = new Count(20);
        assertEquals(21, holder.addAndGet(1));
      }
    
      public void testGetAndSet() {
        Count holder = new Count(10);
        assertEquals(10, holder.getAndSet(20));
        assertEquals(20, holder.get());
      }
    
      public void testSet() {
        Count holder = new Count(10);
        holder.set(20);
        assertEquals(20, holder.get());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top