Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 219 for snippet (0.47 sec)

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

     *   <li>Implementations generally do not cache hash codes. If your element or key type has a slow
     *       {@code hashCode} implementation, it should cache it itself.
     * </ul>
     *
     * <h4>Example usage</h4>
     *
     * {@snippet :
     * class Foo {
     *   private static final ImmutableSet<String> RESERVED_CODES =
     *       ImmutableSet.of("AZ", "CQ", "ZX");
     *
     *   private final ImmutableSet<String> codes;
     *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableList.java

        return new ImmutableList.Builder<>(expectedSize);
      }
    
      /**
       * A builder for creating immutable list instances, especially {@code public static final} lists
       * ("constant lists"). Example:
       *
       * {@snippet :
       * public static final ImmutableList<Color> GOOGLE_COLORS =
       *     new ImmutableList.Builder<Color>()
       *         .addAll(WEBSAFE_COLORS)
       *         .add(new Color(0, 191, 255))
       *         .build();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

     * the life cycle methods.
     *
     * <h3>Usage Example</h3>
     *
     * <p>Here is a sketch of a service which crawls a website and uses the scheduling capabilities to
     * rate limit itself.
     *
     * {@snippet :
     * class CrawlingService extends AbstractScheduledService {
     *   private Set<Uri> visited;
     *   private Queue<Uri> toCrawl;
     *   protected void startUp() throws Exception {
     *     toCrawl = readStartingUris();
     *   }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

     * when appropriate and {@link #awaitHealthy} will still work as expected.
     *
     * <p>Here is a simple example of how to use a {@code ServiceManager} to start a server.
     *
     * {@snippet :
     * class Server {
     *   public static void main(String[] args) {
     *     Set<Service> services = ...;
     *     ServiceManager manager = new ServiceManager(services);
     *     manager.addListener(new Listener() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/Predicates.java

      }
    
      /**
       * Returns a predicate that evaluates to {@code true} if the class being tested is assignable to
       * (is a subtype of) {@code clazz}. Example:
       *
       * {@snippet :
       * List<Class<?>> classes = Arrays.asList(
       *     Object.class, String.class, Number.class, Long.class);
       * return Iterables.filter(classes, subtypeOf(Number.class));
       * }
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 26.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableMultimap.java

        return new Builder<>(expectedKeys);
      }
    
      /**
       * A builder for creating immutable multimap instances, especially {@code public static final}
       * multimaps ("constant multimaps"). Example:
       *
       * {@snippet :
       * static final Multimap<String, Integer> STRING_TO_INTEGER_MULTIMAP =
       *     new ImmutableMultimap.Builder<String, Integer>()
       *         .put("one", 1)
       *         .putAll("several", 1, 2, 3)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 28.6K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

      }
    
      /**
       * A builder for creating immutable multiset instances, especially {@code public static final}
       * multisets ("constant multisets"). Example:
       *
       * {@snippet :
       * public static final ImmutableSortedMultiset<Bean> BEANS =
       *     new ImmutableSortedMultiset.Builder<Bean>(colorComparator())
       *         .addCopies(Bean.COCOA, 4)
       *         .addCopies(Bean.GARDEN, 6)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 29.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

     * the life cycle methods.
     *
     * <h3>Usage Example</h3>
     *
     * <p>Here is a sketch of a service which crawls a website and uses the scheduling capabilities to
     * rate limit itself.
     *
     * {@snippet :
     * class CrawlingService extends AbstractScheduledService {
     *   private Set<Uri> visited;
     *   private Queue<Uri> toCrawl;
     *   protected void startUp() throws Exception {
     *     toCrawl = readStartingUris();
     *   }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Iterables.java

       * This does perform a little more work than necessary, so another option is to insert an
       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableSet.java

        checkNonnegative(expectedSize, "expectedSize");
        return new Builder<>(expectedSize);
      }
    
      /**
       * A builder for creating {@code ImmutableSet} instances. Example:
       *
       * {@snippet :
       * static final ImmutableSet<Color> GOOGLE_COLORS =
       *     ImmutableSet.<Color>builder()
       *         .addAll(WEBSAFE_COLORS)
       *         .add(new Color(0, 191, 255))
       *         .build();
       * }
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.2K bytes
    - Viewed (0)
Back to top