Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 80 for mapEntry (0.07 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/CollectionIteratorTester.java

    import static com.google.common.collect.testing.Helpers.assertEqualIgnoringOrder;
    import static com.google.common.collect.testing.Helpers.copyToList;
    import static com.google.common.collect.testing.Helpers.mapEntry;
    import static com.google.common.collect.testing.IteratorFeature.MODIFIABLE;
    import static com.google.common.collect.testing.IteratorFeature.UNMODIFIABLE;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/HashBiMap.java

        return new Itr<Entry<K, V>>() {
          @Override
          Entry<K, V> output(BiEntry<K, V> entry) {
            return new MapEntry(entry);
          }
    
          class MapEntry extends AbstractMapEntry<K, V> {
            private BiEntry<K, V> delegate;
    
            MapEntry(BiEntry<K, V> entry) {
              this.delegate = entry;
            }
    
            @Override
            @ParametricNullness
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 24.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/LinkedHashMultimapTest.java

        multimap = SerializableTester.reserializeAndAssert(multimap);
        assertThat(multimap.keySet()).containsExactly("a", "b", "c").inOrder();
        assertThat(multimap.entries())
            .containsExactly(mapEntry("b", 2), mapEntry("a", 3), mapEntry("c", 4))
            .inOrder();
        // note that the keys and entries are in different orders
      }
    
      private void assertOrderingReadOnly(Multimap<String, Integer> multimap) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceAllTester.java

                });
        List<Entry<K, V>> expectedEntries = new ArrayList<>();
        for (Entry<K, V> entry : getSampleEntries()) {
          int index = keys().asList().indexOf(entry.getKey());
          expectedEntries.add(Helpers.mapEntry(entry.getKey(), values().asList().get(index + 1)));
        }
        expectContents(expectedEntries);
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionFeature.Require(KNOWN_ORDER)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

            .expectCollects(ImmutableListMultimap.of())
            .expectCollects(
                ImmutableListMultimap.of("a", 1, "b", 2, "a", 3, "c", 4),
                mapEntry("a", 1),
                mapEntry("b", 2),
                mapEntry("a", 3),
                mapEntry("c", 4));
      }
    
      public void testFlatteningToImmutableListMultimap() {
        Collector<String, ?, ImmutableListMultimap<Character, Character>> collector =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

                  if (!mapEntries.hasNext()) {
                    return endOfData();
                  }
                  Map.Entry<E, AtomicInteger> mapEntry = mapEntries.next();
                  int count = mapEntry.getValue().get();
                  if (count != 0) {
                    return Multisets.immutableEntry(mapEntry.getKey(), count);
                  }
                }
              }
            };
    
        return new ForwardingIterator<Entry<E>>() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/TreeRangeMap.java

      }
    
      @Override
      @CheckForNull
      public Entry<Range<K>, V> getEntry(K key) {
        Entry<Cut<K>, RangeMapEntry<K, V>> mapEntry =
            entriesByLowerBound.floorEntry(Cut.belowValue(key));
        if (mapEntry != null && mapEntry.getValue().contains(key)) {
          return mapEntry.getValue();
        } else {
          return null;
        }
      }
    
      @Override
      public void put(Range<K> range, V value) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java

     * limitations under the License.
     */
    
    package com.google.common.collect.testing;
    
    import static com.google.common.collect.testing.Helpers.copyToList;
    import static com.google.common.collect.testing.Helpers.mapEntry;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.List;
    import java.util.ListIterator;
    import java.util.Map;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

        return copyToSet(asList(elements));
      }
    
      // Would use Maps.immutableEntry
      public static <K extends @Nullable Object, V extends @Nullable Object> Entry<K, V> mapEntry(
          K key, V value) {
        return singletonMap(key, value).entrySet().iterator().next();
      }
    
      private static boolean isEmpty(Iterable<?> iterable) {
        return iterable instanceof Collection
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/Helpers.java

        return copyToSet(asList(elements));
      }
    
      // Would use Maps.immutableEntry
      public static <K extends @Nullable Object, V extends @Nullable Object> Entry<K, V> mapEntry(
          K key, V value) {
        return singletonMap(key, value).entrySet().iterator().next();
      }
    
      private static boolean isEmpty(Iterable<?> iterable) {
        return iterable instanceof Collection
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
Back to top