- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 458 for optionally (0.35 seconds)
-
android/guava/src/com/google/common/base/MoreObjects.java
* Predicates.notNull())}, static importing as necessary. * * <p><b>Note:</b> if {@code first} is represented as an {@link Optional}, this can be * accomplished with {@link Optional#or(Object) first.or(second)}. That approach also allows for * lazy evaluation of the fallback instance, using {@link Optional#or(Supplier) * first.or(supplier)}. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 05 17:38:41 GMT 2026 - 16.2K bytes - Click Count (0) -
guava/src/com/google/common/base/MoreObjects.java
* Predicates.notNull())}, static importing as necessary. * * <p><b>Note:</b> if {@code first} is represented as an {@link Optional}, this can be * accomplished with {@link Optional#or(Object) first.or(second)}. That approach also allows for * lazy evaluation of the fallback instance, using {@link Optional#or(Supplier) * first.or(supplier)}. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 05 17:38:41 GMT 2026 - 16.7K bytes - Click Count (0) -
architecture/standards/0008-use-nullaway.md
# ADR-0008 - Use NullAway for null checking ## Status - ACCEPTED on 2025-08-06 ## Context Our codebase uses `null` extensively to represent an absence of value or optionality of the argument. We utilize nullness annotations in Java code and somewhat rely on IDE warnings to guide us. However, the Java code we have is not fully annotated, which causes several consequences: * IDE warnings can be misleading
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Thu Mar 05 12:39:41 GMT 2026 - 4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/ToStringHelperTest.java
.add("field11", Arrays.asList("Hello")) .add("field12", new ArrayList<>()) .add("field13", new HashMap<>()) // Optionals .add("field26", Optional.of("World")) .add("field27", Optional.absent()) // Arrays .add("field31", new Object[] {"!!!"}) .add("field32", new boolean[0]) .add("field33", new byte[0])
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 15:59:55 GMT 2026 - 22K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Absent.java
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) { return (Optional<T>) checkNotNull(secondChoice); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Apr 15 22:14:00 GMT 2025 - 2.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/ComparatorsTest.java
public void testEmptiesFirst() { Optional<String> empty = Optional.empty(); Optional<String> abc = Optional.of("abc"); Optional<String> z = Optional.of("z"); Comparator<Optional<String>> comparator = emptiesFirst(comparing(String::length)); testComparator(comparator, empty, z, abc); // Just demonstrate that no explicit type parameter is required Comparator<Optional<String>> unused = emptiesFirst(naturalOrder());
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Apr 12 15:07:59 GMT 2025 - 6.4K bytes - Click Count (0) -
guava/src/com/google/common/base/Present.java
@Override public T get() { return reference; } @Override public T or(T defaultValue) { checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); return reference; } @Override public Optional<T> or(Optional<? extends T> secondChoice) { checkNotNull(secondChoice); return this; } @Override public T or(Supplier<? extends T> supplier) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Apr 15 22:14:00 GMT 2025 - 2.5K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Present.java
@Override public T get() { return reference; } @Override public T or(T defaultValue) { checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); return reference; } @Override public Optional<T> or(Optional<? extends T> secondChoice) { checkNotNull(secondChoice); return this; } @Override public T or(Supplier<? extends T> supplier) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Apr 15 22:14:00 GMT 2025 - 2.5K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Streams.java
* * <p><b>Java 9 users:</b> use {@code optional.stream()} instead. */ @Beta @InlineMe(replacement = "optional.stream()") @InlineMeValidationDisabled("Java 9+ API only") public static <T> Stream<T> stream(java.util.Optional<T> optional) { return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty(); } /** * If a value is present in {@code optional}, returns a stream containing only that element,Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 36.8K bytes - Click Count (0) -
guava-testlib/test/com/google/common/testing/FreshValueGeneratorTest.java
} @AndroidIncompatible public void testJavaOptional() { FreshValueGenerator generator = new FreshValueGenerator(); assertEquals(Optional.empty(), generator.generateFresh(new TypeToken<Optional<String>>() {})); assertEquals(Optional.of("2"), generator.generateFresh(new TypeToken<Optional<String>>() {}));
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 18.6K bytes - Click Count (0)