Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for four (0.17 sec)

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

                .put("three", 3)
                .put("one", 1)
                .put("five", 5)
                .put("four", 3)
                .put("four", 5)
                .put("four", 4) // this should win because it's last
                .put("two", 2);
        assertMapEquals(
            builder.buildKeepingLast(), "one", 1, "two", 2, "three", 3, "four", 4, "five", 5);
        try {
          builder.buildOrThrow();
    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)
  2. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> iterator = asList("one", "two", "three", "four", "five").iterator();
        try {
          Iterators.getOnlyElement(iterator);
          fail();
        } catch (IllegalArgumentException expected) {
          assertThat(expected)
              .hasMessageThat()
              .isEqualTo("expected one element but was: <one, two, three, four, five>");
        }
      }
    
    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)
  3. android/guava/src/com/google/common/collect/Comparators.java

    import java.util.List;
    import java.util.stream.Collector;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Provides static methods for working with {@link Comparator} instances. For many other helpful
     * comparator utilities, see either {@code Comparator} itself (for Java 8+), or {@code
     * com.google.common.collect.Ordering} (otherwise).
     *
     * <h3>Relationship to {@code Ordering}</h3>
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableSetMultimap.java

        builder.put(k4, v4);
        builder.put(k5, v5);
        return builder.build();
      }
    
      // looking for of() with > 5 entries? Use the builder instead.
    
      /** Returns a new {@link Builder}. */
      public static <K, V> Builder<K, V> builder() {
        return new Builder<>();
      }
    
      /**
       * A builder for creating immutable {@code SetMultimap} instances, especially {@code public static
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Multisets.java

       *
       * @param sortedMultiset the sorted multiset for which an unmodifiable view is to be generated
       * @return an unmodifiable view of the multiset
       * @since 11.0
       */
      public static <E extends @Nullable Object> SortedMultiset<E> unmodifiableSortedMultiset(
          SortedMultiset<E> sortedMultiset) {
        // it's in its own file so it can be emulated for GWT
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

          default:
            Object[] keys = new Object[size];
            Object[] values = new Object[size];
            if (sameComparator) {
              // Need to check for nulls, but don't need to sort or validate.
              for (int i = 0; i < size; i++) {
                // requireNonNull is safe because the first `size` elements have been filled in.
                Entry<K, V> entry = requireNonNull(entryArray[i]);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

       * provides more type-safety than {@link #builder}, as it can be called only for classes that
       * implement {@link Comparable}.
       */
      public static <E extends Comparable<?>> Builder<E> naturalOrder() {
        return new Builder<>(Ordering.natural());
      }
    
      /**
       * A builder for creating immutable sorted set instances, especially {@code public static final}
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableMap.java

      }
    
      /**
       * Returns the empty map. This map behaves and performs comparably to {@link
       * Collections#emptyMap}, and is preferable mainly for consistency and maintainability of your
       * code.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked")
      public static <K, V> ImmutableMap<K, V> of() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableRangeMap.java

        ImmutableList.Builder<V> valuesBuilder = new ImmutableList.Builder<>(map.size());
        for (Entry<Range<K>, ? extends V> entry : map.entrySet()) {
          rangesBuilder.add(entry.getKey());
          valuesBuilder.add(entry.getValue());
        }
        return new ImmutableRangeMap<>(rangesBuilder.build(), valuesBuilder.build());
      }
    
      /** Returns a new builder for an immutable range map. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

       * memory leaks.
       */
      boolean isPartialView() {
        return ranges.isPartialView();
      }
    
      /** Returns a new builder for an immutable range set. */
      public static <C extends Comparable<?>> Builder<C> builder() {
        return new Builder<>();
      }
    
      /**
       * A builder for immutable range sets.
       *
       * @since 14.0
       */
      public static class Builder<C extends Comparable<?>> {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
Back to top