Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 171 for isPresent (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/tasks/AbstractCheckOrUpdateContributorsInReleaseNotes.kt

        }
    
        @Internal
        protected
        fun getContributorsFromPullRequests(): Set<GitHubUser> {
            if (!milestone.isPresent) {
                throw IllegalStateException("Milestone not set: please rerun the task with `--milestone <milestone>`")
            }
            val prs: MutableList<GitHubPullRequest> = mutableListOf()
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Mon May 16 05:03:11 GMT 2022
    - 5.7K bytes
    - Viewed (0)
  5. 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)
  6. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/extensions.kt

     * limitations under the License.
     */
    
    package gradlebuild.binarycompatibility
    
    import japicmp.util.Optional
    
    
    internal
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 764 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-tests/test/com/google/common/base/EnumsTest.java

        assertThat(Enums.getIfPresent(TestEnum.class, "POODLE")).hasValue(TestEnum.POODLE);
    
        assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).isPresent();
        assertThat(Enums.getIfPresent(TestEnum.class, "HONDA")).isPresent();
        assertThat(Enums.getIfPresent(TestEnum.class, "POODLE")).isPresent();
    
        assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).hasValue(TestEnum.CHEETO);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  9. 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)
  10. 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) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon May 17 14:07:47 GMT 2021
    - 2.5K bytes
    - Viewed (0)
Back to top