- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 78 for isPresent (0.14 seconds)
-
android/guava/src/com/google/common/io/ByteSource.java
* * @throws IOException if an I/O error occurs * @since 15.0 */ public boolean isEmpty() throws IOException { Optional<Long> sizeIfKnown = sizeIfKnown(); if (sizeIfKnown.isPresent()) { return sizeIfKnown.get() == 0L; } Closer closer = Closer.create(); try { InputStream in = closer.register(openStream()); return in.read() == -1; } catch (Throwable e) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 25.7K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Absent.java
@SuppressWarnings("unchecked") // implementation is "fully variant" static <T> Optional<T> withType() { return (Optional<T>) INSTANCE; } private Absent() {} @Override public boolean isPresent() { return false; } @Override public T get() { throw new IllegalStateException("Optional.get() cannot be called on an absent value"); } @Override public T or(T defaultValue) {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Apr 15 22:14:00 GMT 2025 - 2.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java
&& (m.getModifiers() & (PUBLIC | PROTECTED | PRIVATE)) == 0) .transform(Method::getDeclaringClass); if (!supersWithPackagePrivateWriteReplace.isPresent()) { continue; } assertWithMessage( "To help optimizers, any class that inherits a package-private writeReplace() method" + " should override that method.\n"
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Jul 01 03:07:54 GMT 2025 - 5.1K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/ProtoLookup.java
this.components = components; } @Override public <T> T lookup(Class<T> type) { Optional<T> optional = lookupOptional(type); if (optional.isPresent()) { return optional.get(); } else { throw new LookupException("No mapping for key: " + type.getName()); } } @OverrideCreated: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 2.8K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
@Override String read(ByteSource byteSource, Charset cs) throws IOException { Optional<Long> size = byteSource.sizeIfKnown(); // if we know the size and it fits in an int if (size.isPresent() && size.get().longValue() == size.get().intValue()) { // otherwise try to presize a StringBuilder // it is kind of lame that we need to construct a decoder to access this value.Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 5.2K bytes - Click Count (0) -
api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
* if applicable. */ default boolean effectiveVerbose() { return options().isPresent() && options().orElseThrow().verbose().orElse(false) || ciInfo().isPresent() && ciInfo().orElseThrow().isVerbose(); }Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Jun 11 13:14:09 GMT 2025 - 6.7K bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlanCreatorTest.java
}.writePlan(System.out::println, plan); plan.allSteps().forEach(phase -> { phase.predecessors.forEach( pred -> assertTrue(plan.step(pred.project, pred.name).isPresent(), "Phase not present: " + pred)); }); } @Test void testAlias() { MavenProject p1 = new MavenProject(); p1.setArtifactId("p1"); p1.setCollectedProjects(List.of());
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Mar 28 15:21:19 GMT 2025 - 7.9K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/UpgradeStrategy.java
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Tue Nov 18 18:03:26 GMT 2025 - 3.4K bytes - Click Count (0) -
guava/src/com/google/common/collect/Streams.java
* otherwise returns an empty stream. */ public static <T> Stream<T> stream(com.google.common.base.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, * otherwise returns an empty stream. *
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sat Aug 09 01:14:59 GMT 2025 - 36.4K bytes - Click Count (0) -
build-logic/jvm/src/main/kotlin/gradlebuild.launchable-jar.gradle.kts
} } manifest.attributes("Class-Path-Source" to "manifestClasspath") manifest.attributes("Class-Path" to classpath) if (app.mainClassName.isPresent) { manifest.attributes("Main-Class" to app.mainClassName) }Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Fri Jun 21 18:38:28 GMT 2024 - 1.6K bytes - Click Count (0)