Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for One (0.22 sec)

  1. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> iterator = asList("one", "two").iterator();
        try {
          Iterators.getOnlyElement(iterator);
          fail();
        } catch (IllegalArgumentException expected) {
          assertThat(expected).hasMessageThat().isEqualTo("expected one element but was: <one, two>");
        }
      }
    
      public void testGetOnlyElement_noDefault_fiveElements() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 56.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testOf() {
        assertMapEquals(ImmutableMap.of("one", 1), "one", 1);
        assertMapEquals(ImmutableMap.of("one", 1, "two", 2), "one", 1, "two", 2);
        assertMapEquals(
            ImmutableMap.of("one", 1, "two", 2, "three", 3), "one", 1, "two", 2, "three", 3);
        assertMapEquals(
            ImmutableMap.of("one", 1, "two", 2, "three", 3, "four", 4),
            "one",
            1,
            "two",
            2,
            "three",
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 14:39:16 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableTable.java

        implements Serializable {
    
      /**
       * Returns a {@code Collector} that accumulates elements into an {@code ImmutableTable}. Each
       * input element is mapped to one cell in the returned table, with the rows, columns, and values
       * generated by applying the specified functions.
       *
       * <p>The returned {@code Collector} will throw a {@code NullPointerException} at collection time
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Ordering.java

     * when {@code compare} is called on the above ordering:
     *
     * <ol>
     *   <li>First, if only one {@code Foo} is null, that null value is treated as <i>greater</i>
     *   <li>Next, non-null {@code Foo} values are passed to {@code getBarFunction} (we will be
     *       comparing {@code Bar} values from now on)
     *   <li>Next, if only one {@code Bar} is null, that null value is treated as <i>lesser</i>
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Supplier.java

     * future version of {@code com.google.common.base.Supplier} will be made to <i>extend</i> {@code
     * java.util.function.Supplier}, making conversion code necessary only in one direction. At that
     * time, this interface will be officially discouraged.
     *
     * @author Harry Heymann
     * @since 2.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 01:41:50 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableBiMap.java

       * ("constant bimaps"). Example:
       *
       * <pre>{@code
       * static final ImmutableBiMap<String, Integer> WORD_TO_INT =
       *     new ImmutableBiMap.Builder<String, Integer>()
       *         .put("one", 1)
       *         .put("two", 2)
       *         .put("three", 3)
       *         .buildOrThrow();
       * }</pre>
       *
       * <p>For <i>small</i> immutable bimaps, the {@code ImmutableBiMap.of()} methods are even more
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multimaps.java

      /**
       * Returns a multimap view of the specified map. The multimap is backed by the map, so changes to
       * the map are reflected in the multimap, and vice versa. If the map is modified while an
       * iteration over one of the multimap's collection views is in progress (except through the
       * iterator's own {@code remove} operation, or through the {@code setValue} operation on a map
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 86.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Maps.java

      /**
       * Returns the specified comparator if not null; otherwise returns {@code Ordering.natural()}.
       * This method is an abomination of generics; the only purpose of this method is to contain the
       * ugly type-casting in one place.
       */
      @SuppressWarnings("unchecked")
      static <E extends @Nullable Object> Comparator<? super E> orNaturalOrder(
          @CheckForNull Comparator<? super E> comparator) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 159.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableListMultimap.java

       *
       * <pre>{@code
       * static final Multimap<String, Integer> STRING_TO_INTEGER_MULTIMAP =
       *     new ImmutableListMultimap.Builder<String, Integer>()
       *         .put("one", 1)
       *         .putAll("several", 1, 2, 3)
       *         .putAll("many", 1, 2, 3, 4, 5)
       *         .build();
       * }</pre>
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSet.java

              break;
            } else if (value.equals(element)) {
              break;
            }
          }
        }
        Arrays.fill(elements, uniques, n, null);
        if (uniques == 1) {
          // There is only one element or elements are all duplicates
          @SuppressWarnings("unchecked") // we are careful to only pass in E
          // requireNonNull is safe because the first `uniques` elements are non-null.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top