Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getSomeOptionalInt (0.12 sec)

  1. guava-tests/test/com/google/common/base/OptionalTest.java

        Iterable<Number> onlyPresent = Optional.presentInstances(optionals);
        assertThat(onlyPresent).containsExactly(2);
      }
    
      private static Optional<Integer> getSomeOptionalInt() {
        return Optional.of(1);
      }
    
      private static FluentIterable<? extends Number> getSomeNumbers() {
        return FluentIterable.from(ImmutableList.<Number>of());
      }
    
      /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Optional.java

       * Java. As a result, some sensible operations involving subtypes are compile errors:
       *
       * <pre>{@code
       * Optional<Integer> optionalInt = getSomeOptionalInt();
       * Number value = optionalInt.or(0.5); // error
       *
       * FluentIterable<? extends Number> numbers = getSomeNumbers();
       * Optional<? extends Number> first = numbers.first();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top