Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,420 for Integer (0.07 sec)

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

        checkCanReserialize(Functions.forMap(ImmutableMap.of(1, 2), 3));
      }
    
      public void testForMapWithDefault_null() {
        ImmutableMap<String, Integer> map = ImmutableMap.of("One", 1);
        Function<String, @Nullable Integer> function = Functions.forMap(map, null);
    
        assertEquals((Integer) 1, function.apply("One"));
        assertThat(function.apply("Two")).isNull();
    
        // check basic sanity of equals and hashCode
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 16K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MapsTest.java

            diff2.toString());
      }
    
      private static final SortedMap<Integer, Integer> SORTED_EMPTY = Maps.newTreeMap();
      private static final ImmutableSortedMap<Integer, Integer> SORTED_SINGLETON =
          ImmutableSortedMap.of(1, 2);
    
      public void testMapDifferenceOfSortedMapIsSorted() {
        Map<Integer, Integer> map = SORTED_SINGLETON;
        MapDifference<Integer, Integer> difference = Maps.difference(map, EMPTY);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 22:56:33 UTC 2025
    - 65K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java

      public void testTransformEquals() {
        Map<String, Integer> underlying = ImmutableMap.of("a", 0, "b", 1, "c", 2);
        Map<String, Integer> expected = transformValues(underlying, Functions.<Integer>identity());
    
        assertMapsEqual(expected, expected);
    
        Map<String, Integer> equalToUnderlying = Maps.newTreeMap();
        equalToUnderlying.putAll(underlying);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/MutableClassToInstanceMapTest.java

         */
        map.put(Integer.class, new Integer(5));
        assertThrows(ClassCastException.class, () -> map.put(Double.class, new Long(42)));
        // Won't compile: map.put(String.class, "x");
      }
    
      public void testPutAndGetInstance() {
        assertThat(map.putInstance(Integer.class, new Integer(5))).isNull();
    
        Integer oldValue = map.putInstance(Integer.class, new Integer(7));
        assertEquals(5, (int) oldValue);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 5K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

          return insertionOrder;
        }
    
        @Override
        public List<Entry<String, Integer>> create(Object... elements) {
          ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder();
          for (Object o : elements) {
            @SuppressWarnings("unchecked")
            Entry<String, Integer> entry = (Entry<String, Integer>) checkNotNull(o);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

      @Test
      public void loadingCache() throws ExecutionException {
        CacheLoader<Integer, Integer> loader =
            new CacheLoader<Integer, Integer>() {
              int i = 0;
    
              @Override
              public Integer load(Integer key) throws Exception {
                return i++;
              }
            };
    
        LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder().build(loader);
    
        cache.put(10, 20);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 14.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/MultimapsTest.java

      public void testTransformValues() {
        SetMultimap<String, Integer> multimap =
            ImmutableSetMultimap.of("a", 2, "b", -3, "b", 3, "a", 4, "c", 6);
        Function<Integer, Integer> square =
            new Function<Integer, Integer>() {
              @Override
              public Integer apply(Integer in) {
                return in * in;
              }
            };
        Multimap<String, Integer> transformed = Multimaps.transformValues(multimap, square);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 38.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/TreeRangeSetTest.java

        }
        cutsToTest.add(Cut.<Integer>aboveAll());
        cutsToTest.add(Cut.<Integer>belowAll());
        CUTS_TO_TEST = ImmutableList.copyOf(cutsToTest);
      }
    
      private void testRangesByLowerBounds(
          TreeRangeSet<Integer> rangeSet, Iterable<Range<Integer>> expectedRanges) {
        NavigableMap<Cut<Integer>, Range<Integer>> expectedRangesByLowerBound = Maps.newTreeMap();
        for (Range<Integer> range : expectedRanges) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 24.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/LinkedHashMultimapTest.java

      public void testAsSetIteration() {
        Set<Entry<String, Collection<Integer>>> set =
            new LinkedHashSet<>(
                asList(
                    immutableEntry("foo", (Collection<Integer>) newHashSet(2, 3, 6)),
                    immutableEntry("bar", (Collection<Integer>) newHashSet(4, 5, 10, 11)),
                    immutableEntry("baz", (Collection<Integer>) newHashSet(7, 8)),
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Oct 10 23:13:45 UTC 2025
    - 18.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

        ValueGraph<String, Integer> graph1 =
            ImmutableValueGraph.copyOf(ValueGraphBuilder.directed().<String, Integer>build());
        ValueGraph<String, Integer> graph2 = ImmutableValueGraph.copyOf(graph1);
    
        assertThat(graph2).isSameInstanceAs(graph1);
      }
    
      @Test
      public void incidentEdgeOrder_stable() {
        ImmutableValueGraph<String, Integer> immutableValueGraph =
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 17:09:51 UTC 2025
    - 6.4K bytes
    - Viewed (0)
Back to top