Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 169 for now (0.15 sec)

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

       *
       * <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()}.
       */
      @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now.
      public final Optional<@NonNull E> firstMatch(Predicate<? super E> predicate) {
        return Iterables.<E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 30 00:14:39 GMT 2024
    - 35.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

          AtomicLong atomic = map.get(key);
          if (atomic == null) {
            atomic = map.putIfAbsent(key, new AtomicLong(delta));
            if (atomic == null) {
              return delta;
            }
            // atomic is now non-null; fall through
          }
    
          while (true) {
            long oldValue = atomic.get();
            if (oldValue == 0L) {
              // don't compareAndSet a zero
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

        bus.post(EVENT);
    
        List<String> events = catcher.getEvents();
        assertTrue("No events should be delivered synchronously.", events.isEmpty());
    
        // Now we find the task in our Executor and explicitly activate it.
        List<Runnable> tasks = executor.getTasks();
        assertEquals("One event dispatch task should be queued.", 1, tasks.size());
    
        tasks.get(0).run();
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Suppliers.java

          // expensive than the extra volatile reads.
          long nanos = expirationNanos;
          long now = System.nanoTime();
          if (nanos == 0 || now - nanos >= 0) {
            synchronized (this) {
              if (nanos == expirationNanos) { // recheck for lost race
                T t = delegate.get();
                value = t;
                nanos = now + durationNanos;
                // In the very unlikely event that nanos is 0, set it to 1;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Function.java

     *
     * <p>See the Guava User Guide article on <a
     * href="https://github.com/google/guava/wiki/FunctionalExplained">the use of {@code Function}</a>.
     *
     * <h3>For Java 8+ users</h3>
     *
     * <p>This interface is now a legacy type. Use {@code java.util.function.Function} (or the
     * appropriate primitive specialization such as {@code ToIntFunction}) instead whenever possible.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 01:41:50 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/LineBuffer.java

       * @see #finish
       */
      protected void add(char[] cbuf, int off, int len) throws IOException {
        int pos = off;
        if (sawReturn && len > 0) {
          // Last call to add ended with a CR; we can handle the line now.
          if (finishLine(cbuf[pos] == '\n')) {
            pos++;
          }
        }
    
        int start = pos;
        for (int end = off + len; pos < end; pos++) {
          switch (cbuf[pos]) {
            case '\r':
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/escape/CharEscaper.java

            destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index);
            dest = growBuffer(dest, destIndex, destSize);
          }
    
          // If we have skipped any characters, we need to copy them now.
          if (charsSkipped > 0) {
            s.getChars(lastEscape, index, dest, destIndex);
            destIndex += charsSkipped;
          }
    
          // Copy the replacement string into the dest buffer as needed.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/testdata/alice_in_wonderland.txt

    never happened, and now here I am in the middle of one!  There
    ought to be a book written about me, that there ought!  And when
    I grow up, I'll write one--but I'm grown up now,' she added in a
    sorrowful tone; `at least there's no room to grow up any more
    HERE.'
    
      `But then,' thought Alice, `shall I NEVER get any older than I
    am now?  That'll be a comfort, one way--never to be an old woman--
    Plain Text
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 29 21:35:03 GMT 2012
    - 145.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java

        assertEquals(1 << 29, ImmutableSet.chooseTableSize((1 << 29) * 3 / 5));
    
        // Now we hit the cap
        assertEquals(1 << 30, ImmutableSet.chooseTableSize(1 << 29));
        assertEquals(1 << 30, ImmutableSet.chooseTableSize((1 << 30) - 1));
    
        // Now we've gone too far
        assertThrows(IllegalArgumentException.class, () -> ImmutableSet.chooseTableSize(1 << 30));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

       */
      @GwtIncompatible
      @J2ktIncompatible
      @CanIgnoreReturnValue
      @SuppressWarnings("Java7ApiChecker") // guava-android can rely on library desugaring now.
      @IgnoreJRERequirement // TODO: b/288085449 - Remove this once we use library-desugaring scents.
      @Beta // TODO: b/288085449 - Remove @Beta after we're sure that Java 8 APIs are safe for Android
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top