Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CountingSupplier (0.35 sec)

  1. android/guava-tests/test/com/google/common/base/SuppliersTest.java

      public void testMemoizeNonSerializable() throws Exception {
        CountingSupplier countingSupplier = new CountingSupplier();
        Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier);
        assertThat(memoizedSupplier.toString()).isEqualTo("Suppliers.memoize(CountingSupplier)");
        checkMemoize(countingSupplier, memoizedSupplier);
        // Calls to the original memoized supplier shouldn't affect its copy.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/SuppliersTest.java

      public void testMemoizeNonSerializable() throws Exception {
        CountingSupplier countingSupplier = new CountingSupplier();
        Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier);
        assertThat(memoizedSupplier.toString()).isEqualTo("Suppliers.memoize(CountingSupplier)");
        checkMemoize(countingSupplier, memoizedSupplier);
        // Calls to the original memoized supplier shouldn't affect its copy.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MultimapsTest.java

        RED,
        YELLOW,
        GREEN
      }
    
      private abstract static class CountingSupplier<E> implements Supplier<E>, Serializable {
        int count;
    
        abstract E getImpl();
    
        @Override
        public E get() {
          count++;
          return getImpl();
        }
      }
    
      private static class QueueSupplier extends CountingSupplier<Queue<Integer>> {
        @Override
        public Queue<Integer> getImpl() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 38.4K bytes
    - Viewed (0)
Back to top