Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for isPresent (0.2 sec)

  1. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/source/SourceMetaDataVisitor.java

                if (!wildcardType.getExtendedType().isPresent() && !wildcardType.getSuperType().isPresent()) {
                    typeMetaData.setWildcard();
                } else {
                    wildcardType.getExtendedType().ifPresent(referenceType -> typeMetaData.setUpperBounds(extractTypeName(referenceType)));
                    wildcardType.getSuperType().ifPresent(referenceType -> typeMetaData.setLowerBounds(extractTypeName(referenceType)));
    Java
    - Registered: Wed Apr 17 11:36:08 GMT 2024
    - Last Modified: Thu Sep 21 13:27:02 GMT 2023
    - 11.7K bytes
    - Viewed (0)
  2. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/JapicmpTask.java

        private static RichReport.Configuration reportConfigurationOf(Provider<RichReport> report) {
            if (report.isPresent()) {
                return report.get().toConfiguration();
            }
            return null;
        }
    
        private static File maybeFile(RegularFileProperty property) {
            if (property.isPresent()) {
                return property.getAsFile().get();
            }
            return null;
        }
    
    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)
  3. guava/src/com/google/common/base/Optional.java

      Optional() {}
    
      /**
       * Returns {@code true} if this holder contains a (non-null) instance.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> no differences.
       */
      public abstract boolean isPresent();
    
      /**
       * Returns the contained instance, which must be present. If the instance might be absent, use
       * {@link #or(Object)} or {@link #orNull} instead.
       *
    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)
  4. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      public void testIsPresent_no() {
        assertFalse(Optional.absent().isPresent());
      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testIsPresent_yes() {
        assertTrue(Optional.of("training").isPresent());
      }
    
      public void testGet_absent() {
        Optional<String> optional = Optional.absent();
        try {
          optional.get();
    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)
  5. guava/src/com/google/common/base/MoreObjects.java

            return !((java.util.Optional<?>) value).isPresent();
          } else if (value instanceof OptionalInt) {
            return !((OptionalInt) value).isPresent();
          } else if (value instanceof OptionalLong) {
            return !((OptionalLong) value).isPresent();
          } else if (value instanceof OptionalDouble) {
            return !((OptionalDouble) value).isPresent();
          } else if (value instanceof Optional) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 15.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      public void testIsPresent_no() {
        assertFalse(Optional.absent().isPresent());
      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testIsPresent_yes() {
        assertTrue(Optional.of("training").isPresent());
      }
    
      public void testGet_absent() {
        Optional<String> optional = Optional.absent();
        try {
          optional.get();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. 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) {
    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)
  8. android/guava/src/com/google/common/base/Optional.java

      Optional() {}
    
      /**
       * Returns {@code true} if this holder contains a (non-null) instance.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> no differences.
       */
      public abstract boolean isPresent();
    
      /**
       * Returns the contained instance, which must be present. If the instance might be absent, use
       * {@link #or(Object)} or {@link #orNull} instead.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/CharSource.java

       * @since 19.0
       */
      public long length() throws IOException {
        Optional<Long> lengthIfKnown = lengthIfKnown();
        if (lengthIfKnown.isPresent()) {
          return lengthIfKnown.get();
        }
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          return countBySkipping(reader);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  10. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/BuildParams.kt

            }
        }.toMap()
    
    
    /**
     * Creates a [Provider] that returns `true` when this [Provider] has a value
     * and `false` otherwise. The returned [Provider] always has a value.
     * @see Provider.isPresent
     */
    private
    fun <T> Provider<T>.presence(): Provider<Boolean> =
        map { true }.orElse(false)
    
    
    fun Project.gradleProperty(propertyName: String) = providers.gradleProperty(propertyName)
    
    
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Mon Jan 01 01:23:31 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top