- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for defaultValue (0.78 sec)
-
android/guava/src/com/google/common/collect/Iterables.java
* Returns the first element in {@code iterable} that satisfies the given predicate, or {@code * defaultValue} if none found. Note that this can usually be handled more naturally using {@code * tryFind(iterable, predicate).or(defaultValue)}. * * <p><b>{@code Stream} equivalent:</b> {@code * stream.filter(predicate).findFirst().orElse(defaultValue)} * * @since 7.0 */ // The signature we really want here is... //
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
* determined. */ public static <T> @Nullable T get(Class<T> type) { T defaultValue = DEFAULTS.getInstance(type); if (defaultValue != null) { return defaultValue; } Class<? extends T> implementation = getImplementation(type); if (implementation != null) { return get(implementation); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 17 16:33:44 UTC 2024 - 20.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Optional.java
/** * Returns the contained instance if it is present; {@code defaultValue} otherwise. If no default * value should be required because the instance is known to be present, use {@link #get()} * instead. For a default value of {@code null}, use {@link #orNull}. * * <p>Note about generics: The signature {@code public T or(T defaultValue)} is overly
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 13K bytes - Viewed (0) -
android/guava/src/com/google/common/graph/Graphs.java
public V edgeValueOrDefault(N nodeU, N nodeV, @CheckForNull V defaultValue) { return delegate().edgeValueOrDefault(nodeV, nodeU, defaultValue); // transpose } @Override @CheckForNull public V edgeValueOrDefault(EndpointPair<N> endpoints, @CheckForNull V defaultValue) { return delegate().edgeValueOrDefault(transpose(endpoints), defaultValue); } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 21.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
* position}th position or {@code defaultValue} otherwise. * * @param position position of the element to return * @param defaultValue the default value to return if the iterator is empty or if {@code position} * is greater than the number of elements remaining in {@code iterator} * @return the element at the specified position in {@code iterator} or {@code defaultValue} if
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 03 14:46:32 UTC 2024 - 50.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java
@SuppressWarnings("unchecked") // Assume all default values are generics safe. T defaultValue = (T) defaultValues.getInstance(rawType); if (defaultValue != null) { return defaultValue; } @SuppressWarnings("unchecked") // ArbitraryInstances always returns generics-safe dummies. T value = (T) ArbitraryInstances.get(rawType); if (value != null) { return value; }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 11 16:13:05 UTC 2024 - 32.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/NullPointerTester.java
// We assume that all defaults are generics-safe, even if they aren't, // we take the risk. @SuppressWarnings("unchecked") T defaultValue = (T) defaults.getInstance(type.getRawType()); if (defaultValue != null) { return defaultValue; } @SuppressWarnings("unchecked") // All arbitrary instances are generics-safe T arbitrary = (T) ArbitraryInstances.get(type.getRawType());
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 11 16:13:05 UTC 2024 - 22.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java
throw new UnsupportedOperationException(); } private <T> T pickInstance(T[] instances, T defaultValue) { return pickInstance(Arrays.asList(instances), defaultValue); } private <T> T pickInstance(Collection<T> instances, T defaultValue) { if (instances.isEmpty()) { return defaultValue; } // generateInt() is 1-based.
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 17 16:33:44 UTC 2024 - 28K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMap.java
/* * Even though it's weird to pass a defaultValue that is null, some callers do so. Those who * pass a literal "null" should probably just use `get`, but I would expect other callers to * pass an expression that *might* be null. This could happen with: * * - a `getFooOrDefault(@CheckForNull Foo defaultValue)` method that returns
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sun Jun 02 13:36:19 UTC 2024 - 41.6K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/LocalCache.java
} return value; } @Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { V result = get(key); return (result != null) ? result : defaultValue; } V getOrLoad(K key) throws ExecutionException { return get(key, defaultLoader); } ImmutableMap<K, V> getAllPresent(Iterable<?> keys) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sat May 18 03:24:34 UTC 2024 - 143.6K bytes - Viewed (0)