Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for Promise (0.18 sec)

  1. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java

      }
    
      @JsFunction
      interface IThenOnRejectedCallbackFn<V extends @Nullable Object> {
        V onInvoke(Object p0);
      }
    }
    
    /** Subset of the elemental2 Promise API. */
    @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Promise")
    class Promise<T extends @Nullable Object> implements IThenable<T> {
    
      @JsFunction
      interface PromiseExecutorCallbackFn<T extends @Nullable Object> {
        @JsFunction
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 24 18:27:19 GMT 2023
    - 3.9K bytes
    - Viewed (1)
  2. guava/src/com/google/common/collect/ImmutableList.java

           * we're copying into a `contents` array whose type allows it to contain nulls. Still, it's
           * worth noting that we promise not to put nulls into the array in the first `size` elements.
           * We uphold that promise here because our callers promise that `elements` will not contain
           * nulls in its first `n` elements.
           */
          System.arraycopy(elements, 0, contents, size, n);
          size += n;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 30K bytes
    - Viewed (1)
  3. android/guava/src/com/google/common/collect/ImmutableCollection.java

           * we're copying into a `contents` array whose type allows it to contain nulls. Still, it's
           * worth noting that we promise not to put nulls into the array in the first `size` elements.
           * We uphold that promise here because our callers promise that `elements` will not contain
           * nulls in its first `n` elements.
           */
          System.arraycopy(elements, 0, contents, size, n);
          size += n;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/SetsTest.java

      }
    
      public void testPowerSetIteration_manual() {
        ImmutableSet<Integer> elements = ImmutableSet.of(1, 2, 3);
        Set<Set<Integer>> powerSet = powerSet(elements);
        // The API doesn't promise this iteration order, but it's convenient here.
        Iterator<Set<Integer>> i = powerSet.iterator();
        assertEquals(ImmutableSet.of(), i.next());
        assertEquals(ImmutableSet.of(1), i.next());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 49.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

                // callable actually completes. (We could detect completion in our wrapper
                // `AsyncCallable task`.) However, our contract also promises:
                //
                // 2. not to cancel any Future the user returned from an AsyncCallable
                //
                // We promise this because, once we cancel that Future, we would no longer be able to
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            Iterable<?> locks2 = striped.bulkGet(objects);
            assertEquals(Lists.newArrayList(locks), Lists.newArrayList(locks2));
          }
        }
      }
    
      /** Checks idempotency, and that we observe the promised number of stripes. */
      public void testBasicInvariants() {
        for (Striped<?> striped : allImplementations()) {
          assertBasicInvariants(striped);
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/OrderingTest.java

            Arrays.asList(1, 2, 3, 4, 5),
            Ordering.<Integer>natural().leastOf(list.iterator(), Integer.MAX_VALUE));
      }
    
      public void testGreatestOfIterable_simple() {
        /*
         * If greatestOf() promised to be implemented as reverse().leastOf(), this
         * test would be enough. It doesn't... but we'll cheat and act like it does
         * anyway. There's a comment there to remind us to fix this if we change it.
         */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/OrderingTest.java

            Arrays.asList(1, 2, 3, 4, 5),
            Ordering.<Integer>natural().leastOf(list.iterator(), Integer.MAX_VALUE));
      }
    
      public void testGreatestOfIterable_simple() {
        /*
         * If greatestOf() promised to be implemented as reverse().leastOf(), this
         * test would be enough. It doesn't... but we'll cheat and act like it does
         * anyway. There's a comment there to remind us to fix this if we change it.
         */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      public void testFromNullable() {
        Optional<String> optionalName = Optional.fromNullable("bob");
        assertEquals("bob", optionalName.get());
      }
    
      public void testFromNullable_null() {
        // not promised by spec, but easier to test
        assertSame(Optional.absent(), Optional.fromNullable(null));
      }
    
      public void testIsPresent_no() {
        assertFalse(Optional.absent().isPresent());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            Iterable<?> locks2 = striped.bulkGet(objects);
            assertEquals(Lists.newArrayList(locks), Lists.newArrayList(locks2));
          }
        }
      }
    
      /** Checks idempotency, and that we observe the promised number of stripes. */
      public void testBasicInvariants() {
        for (Striped<?> striped : allImplementations()) {
          assertBasicInvariants(striped);
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
Back to top