- Sort Score
- Num 10 results
- Language All
Results 171 - 180 of 222 for snippets (0.1 seconds)
-
android/guava/src/com/google/common/base/Preconditions.java
* its caller has made a mistake. This allows constructs such as * * {@snippet : * public static double sqrt(double value) { * if (value < 0) { * throw new IllegalArgumentException("input is negative: " + value); * } * // calculate square root * } * } * * <p>to be replaced with the more compact * * {@snippet : * public static double sqrt(double value) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 08 18:10:02 GMT 2026 - 53.5K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableMultiset.java
return new Builder<>(); } /** * A builder for creating immutable multiset instances, especially {@code public static final} * multisets ("constant multisets"). Example: * * {@snippet : * public static final ImmutableMultiset<Bean> BEANS = * new ImmutableMultiset.Builder<Bean>() * .addCopies(Bean.COCOA, 4) * .addCopies(Bean.GARDEN, 6)
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 20.6K bytes - Click Count (0) -
guava/src/com/google/common/base/Preconditions.java
* its caller has made a mistake. This allows constructs such as * * {@snippet : * public static double sqrt(double value) { * if (value < 0) { * throw new IllegalArgumentException("input is negative: " + value); * } * // calculate square root * } * } * * <p>to be replaced with the more compact * * {@snippet : * public static double sqrt(double value) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 08 18:10:02 GMT 2026 - 53.5K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/HashFunction.java
@Immutable public interface HashFunction { /** * Begins a new hash code computation by returning an initialized, stateful {@code Hasher} * instance that is ready to receive data. Example: * * {@snippet : * HashFunction hf = Hashing.md5(); * HashCode hc = hf.newHasher() * .putLong(id) * .putBoolean(isActive) * .hash(); * } */ Hasher newHasher(); /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 10.9K bytes - Click Count (0) -
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; *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 18.7K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* corresponding to smaller values of {@link Enum#ordinal()} should only be acquired before locks * with larger ordinals. Example: * * {@snippet : * enum MyLockOrder { * FIRST, SECOND, THIRD; * } * * CycleDetectingLockFactory.WithExplicitOrdering<MyLockOrder> factory =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 36K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
* cache instances created by {@code CacheBuilder} will not perform any type of eviction. * * <p>Usage example: * * {@snippet : * LoadingCache<Key, Graph> graphs = CacheBuilder.newBuilder() * .maximumSize(10000) * .expireAfterWrite(Duration.ofMinutes(10)) * .removalListener(MY_LISTENER) * .build(Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 13:13:59 GMT 2026 - 52K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Ascii.java
* maxLength} chars in length and will end with the given {@code truncationIndicator}. Otherwise, * the sequence will be returned as a string with no changes to the content. * * <p>Examples: * * {@snippet : * Ascii.truncate("foobar", 7, "..."); // returns "foobar" * Ascii.truncate("foobar", 5, "..."); // returns "fo..." * } *Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 21.7K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableBiMap.java
return new Builder<>(expectedSize); } /** * A builder for creating immutable bimap instances, especially {@code public static final} bimaps * ("constant bimaps"). Example: * * {@snippet : * static final ImmutableBiMap<String, Integer> WORD_TO_INT = * new ImmutableBiMap.Builder<String, Integer>() * .put("one", 1) * .put("two", 2) * .put("three", 3)
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 22.2K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Tables.java
* through the returned table. * * <p>It is imperative that the user manually synchronize on the returned table when accessing any * of its collection views: * * {@snippet : * Table<R, C, V> table = Tables.synchronizedTable(HashBasedTable.create()); * ... * Map<C, V> row = table.row(rowKey); // Needn't be in synchronized block * ...Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 24.9K bytes - Click Count (0)