- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for defaultValue (0.18 sec)
-
guava-tests/test/com/google/common/base/DefaultsTest.java
assertEquals(false, Defaults.defaultValue(boolean.class).booleanValue()); assertEquals('\0', Defaults.defaultValue(char.class).charValue()); assertEquals(0, Defaults.defaultValue(byte.class).byteValue()); assertEquals(0, Defaults.defaultValue(short.class).shortValue()); assertEquals(0, Defaults.defaultValue(int.class).intValue()); assertEquals(0, Defaults.defaultValue(long.class).longValue());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Oct 10 08:40:05 GMT 2023 - 1.5K bytes - Viewed (0) -
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... //
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 24 19:38:27 GMT 2024 - 42.8K bytes - Viewed (0) -
guava/src/com/google/common/base/Absent.java
return false; } @Override public T get() { throw new IllegalStateException("Optional.get() cannot be called on an absent value"); } @Override public T or(T defaultValue) { return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); } @SuppressWarnings("unchecked") // safe covariant cast @Override public Optional<T> or(Optional<? extends T> secondChoice) {
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon May 17 14:07:47 GMT 2021 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Absent.java
return false; } @Override public T get() { throw new IllegalStateException("Optional.get() cannot be called on an absent value"); } @Override public T or(T defaultValue) { return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); } @SuppressWarnings("unchecked") // safe covariant cast @Override public Optional<T> or(Optional<? extends T> secondChoice) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon May 17 14:07:47 GMT 2021 - 2.5K bytes - Viewed (0) -
guava/src/com/google/common/base/Functions.java
* @return function that returns {@code map.get(a)} when {@code a} is a key, or {@code * defaultValue} otherwise */ public static <K extends @Nullable Object, V extends @Nullable Object> Function<K, V> forMap( Map<K, ? extends V> map, @ParametricNullness V defaultValue) { return new ForMapWithDefault<>(map, defaultValue); }
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 14.1K 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.
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 17 16:33:44 GMT 2024 - 28K bytes - Viewed (0) -
android/guava/src/com/google/common/graph/ForwardingValueGraph.java
@CheckForNull public V edgeValueOrDefault(N nodeU, N nodeV, @CheckForNull V defaultValue) { return delegate().edgeValueOrDefault(nodeU, nodeV, defaultValue); } @Override @CheckForNull public V edgeValueOrDefault(EndpointPair<N> endpoints, @CheckForNull V defaultValue) { return delegate().edgeValueOrDefault(endpoints, defaultValue); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 26 17:43:39 GMT 2021 - 2.9K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Functions.java
* @return function that returns {@code map.get(a)} when {@code a} is a key, or {@code * defaultValue} otherwise */ public static <K extends @Nullable Object, V extends @Nullable Object> Function<K, V> forMap( Map<K, ? extends V> map, @ParametricNullness V defaultValue) { return new ForMapWithDefault<>(map, defaultValue); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 14.1K bytes - Viewed (0) -
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
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 14.6K 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; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 08 17:31:55 GMT 2024 - 33K bytes - Viewed (0)