Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 19 for orNull (0.06 seconds)

  1. android/guava/src/com/google/common/base/Absent.java

      }
    
      @Override
      public T or(Supplier<? extends T> supplier) {
        return checkNotNull(
            supplier.get(), "use Optional.orNull() instead of a Supplier that returns null");
      }
    
      @Override
      public @Nullable T orNull() {
        return null;
      }
    
      @Override
      public Set<T> asSet() {
        return Collections.emptySet();
      }
    
      @Override
      public <V> Optional<V> transform(Function<? super T, V> function) {
    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)
  2. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/BuildParams.kt

    val Project.maxTestDistributionRemoteExecutors: Int?
        get() = gradleProperty(MAX_TEST_DISTRIBUTION_REMOTE_EXECUTORS).orNull?.toInt()
    
    val Project.maxTestDistributionLocalExecutors: Int?
        get() = gradleProperty(MAX_TEST_DISTRIBUTION_LOCAL_EXECUTORS).orNull?.toInt()
    
    val Project.toolchainInstallationPaths: Provider<String>
        get() = gradleProperty(JAVA_INSTALLATIONS_PATHS_PROPERTY)
    
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Thu Dec 18 22:01:30 GMT 2025
    - 17.7K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/base/Present.java

      public boolean isPresent() {
        return true;
      }
    
      @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
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Apr 15 22:14:00 GMT 2025
    - 2.5K bytes
    - Click Count (0)
  4. build-logic-commons/publishing/src/main/kotlin/gradlebuild.publish-defaults.gradle.kts

    val artifactoryUrl
        get() = System.getenv("GRADLE_INTERNAL_REPO_URL") ?: ""
    
    val artifactoryUserName
        get() = project.providers.gradleProperty("artifactoryUserName").orNull
    
    val artifactoryUserPassword
        get() = project.providers.gradleProperty("artifactoryUserPassword").orNull
    
    tasks.withType<AbstractPublishToMaven>().configureEach {
        val noUpload = project.gradleProperty("noUpload")
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Thu Jul 17 16:12:44 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  5. build-logic-commons/publishing/src/main/kotlin/gradlebuild.publish-public-libraries.gradle.kts

    val signArtifacts: Boolean = !pgpSigningKey.orNull.isNullOrEmpty()
    
    tasks.withType<Sign>().configureEach { isEnabled = signArtifacts }
    
    signing {
        useInMemoryPgpKeys(
            project.providers.environmentVariable("PGP_SIGNING_KEY").orNull,
            project.providers.environmentVariable("PGP_SIGNING_KEY_PASSPHRASE").orNull
        )
        publishing.publications.configureEach {
            if (signArtifacts) {
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Thu Oct 30 16:56:31 GMT 2025
    - 5.7K bytes
    - Click Count (0)
  6. build-logic-commons/module-identity/src/main/kotlin/gradlebuild/identity/provider/BuildTimestampValueSource.kt

                    timeZone = TimeZone.getTimeZone("UTC")
                }
                return formatter.format(Date(0L))
            }
    
            val buildTimestampFromReceipt = buildTimestampFromBuildReceipt.orNull
            if (buildTimestampFromReceipt != null) {
                println("Using timestamp from incoming build receipt: $buildTimestampFromReceipt")
                return buildTimestampFromReceipt
            }
    
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Thu Jun 05 17:24:26 GMT 2025
    - 3.7K bytes
    - Click Count (0)
  7. build-logic-commons/publishing/src/main/kotlin/gradlebuild.kotlin-dsl-plugin-bundle.gradle.kts

    val signArtifacts: Boolean = !pgpSigningKey.orNull.isNullOrEmpty()
    
    tasks.withType<Sign>().configureEach { isEnabled = signArtifacts }
    
    signing {
        useInMemoryPgpKeys(pgpSigningKey.orNull, pgpSigningPassPhrase.orNull)
        publishing.publications.configureEach {
            if (signArtifacts) {
                signing.sign(this)
            }
        }
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Wed Jul 02 12:28:02 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/base/Optional.java

      // If users use this when they shouldn't, we hope that NewApi will catch subsequent Optional calls
      @IgnoreJRERequirement
      public java.util.Optional<T> toJavaUtil() {
        return java.util.Optional.ofNullable(orNull());
      }
    
      Optional() {}
    
      /**
       * Returns {@code true} if this holder contains a (non-null) instance.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> no differences.
       */
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Jun 04 13:03:16 GMT 2025
    - 15.4K bytes
    - Click Count (0)
  9. build-logic/integration-testing/src/main/kotlin/gradlebuild.cross-version-tests.gradle.kts

            dependencies {
                "crossVersionTestImplementation"(testFixtures(project(":tooling-api")))
            }
        }
    }
    val releasedVersions = gradleModule.identity.releasedVersions.orNull
    
    fun createQuickFeedbackTasks() {
        val testType = TestType.CROSSVERSION
        val defaultExecuter = "embedded"
        val prefix = testType.prefix
        testType.executers.forEach { executer ->
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Fri Sep 05 02:31:24 GMT 2025
    - 4.5K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testOrNull_present() {
        assertEquals("a", Optional.of("a").orNull());
      }
    
      public void testOrNull_absent() {
        assertThat(Optional.absent().orNull()).isNull();
      }
    
      public void testAsSet_present() {
        Set<String> expected = Collections.singleton("a");
        assertEquals(expected, Optional.of("a").asSet());
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 10.5K bytes
    - Click Count (0)
Back to Top