- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 396 for Optional (0.36 sec)
-
guava/src/com/google/common/base/Optional.java
*/ @DoNotMock("Use Optional.of(value) or Optional.absent()") @GwtCompatible(serializable = true) @ElementTypesAreNonnullByDefault public abstract class Optional<T> implements Serializable { /** * Returns an {@code Optional} instance with no contained reference. * * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's * {@code Optional.empty}. */ public static <T> Optional<T> absent() {
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/src/com/google/common/base/Optional.java
*/ @DoNotMock("Use Optional.of(value) or Optional.absent()") @GwtCompatible(serializable = true) @ElementTypesAreNonnullByDefault public abstract class Optional<T> implements Serializable { /** * Returns an {@code Optional} instance with no contained reference. * * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's * {@code Optional.empty}. */ public static <T> Optional<T> absent() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 13K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java
} private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL = new Function<Object, Optional<?>>() { @Override public Optional<?> apply(@Nullable Object obj) { return Optional.fromNullable(obj); } }; private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE = new Function<Optional<?>, @Nullable Object>() { @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 8.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/OptionalTest.java
assertThat(Optional.presentInstances(optionals)).isEmpty(); } public void testPresentInstances_somePresent() { List<Optional<String>> optionals = ImmutableList.of(Optional.of("a"), Optional.<String>absent(), Optional.of("c")); assertThat(Optional.presentInstances(optionals)).containsExactly("a", "c").inOrder(); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 11.2K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/JapicmpTask.java
@Optional public abstract ListProperty<String> getMethodIncludes(); @Input @Optional public abstract ListProperty<String> getMethodExcludes(); @Input @Optional public abstract ListProperty<String> getFieldIncludes(); @Input @Optional public abstract ListProperty<String> getFieldExcludes(); @Input @Optional
Java - Registered: Wed Apr 24 11:36:11 GMT 2024 - Last Modified: Wed Apr 26 10:58:32 GMT 2023 - 13.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ComparatorsTest.java
assertTrue(Comparators.isInStrictOrder(Collections.<Integer>emptyList(), Ordering.natural())); } public void testEmptiesFirst() { Optional<String> empty = Optional.empty(); Optional<String> abc = Optional.of("abc"); Optional<String> z = Optional.of("z"); Comparator<Optional<String>> comparator = Comparators.emptiesFirst(comparing(String::length)); Helpers.testComparator(comparator, empty, z, abc);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Apr 11 08:42:51 GMT 2024 - 6.6K bytes - Viewed (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilderRequest.java
} @Nonnull @Override public Optional<Source> getGlobalToolchainsSource() { return Optional.ofNullable(globalToolchainsSource); } @Nonnull @Override public Optional<Source> getUserToolchainsSource() { return Optional.ofNullable(userToolchainsSource); } } }
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Mon Mar 25 10:50:01 GMT 2024 - 5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/ToStringHelperBenchmark.java
.addValue(null) .add(SHORT_NAME, java.util.Optional.of("1")) .add(LONG_NAME, java.util.Optional.of("1")) .add(SHORT_NAME, java.util.Optional.empty()) .add(LONG_NAME, java.util.Optional.empty()) .add(SHORT_NAME, Optional.of("2")) .add(SHORT_NAME, Optional.absent()) .addValue(null) .add(SHORT_NAME, new int[] {1})
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri May 14 22:05:11 GMT 2021 - 4.3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
} @Override public Optional<Long> sizeIfKnown() { Optional<Long> optionalUnslicedSize = ByteSource.this.sizeIfKnown(); if (optionalUnslicedSize.isPresent()) { long unslicedSize = optionalUnslicedSize.get(); long off = Math.min(offset, unslicedSize); return Optional.of(Math.min(length, unslicedSize - off)); } return Optional.absent(); } @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 26.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
} return root; } }, ALL_RIGHT { @Override Optional<BinaryNode> createTree(int size, Random rng) { Optional<BinaryNode> root = Optional.absent(); for (int i = 0; i < size; i++) { root = Optional.of(new BinaryNode(rng.nextInt(), Optional.<BinaryNode>absent(), root)); } return root; } }, RANDOM {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 26 19:18:53 GMT 2019 - 4.9K bytes - Viewed (0)