Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for puts (0.12 sec)

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

          } catch (UnsupportedOperationException expected) {
          }
        }
      }
    
      public void testPut() {
        assertNull(table.put("foo", 1, cellValue('a')));
        assertNull(table.put("bar", 1, cellValue('b')));
        assertNull(table.put("foo", 3, cellValue('c')));
        assertEquals((Character) 'a', table.put("foo", 1, cellValue('d')));
        assertEquals((Character) 'd', table.get("foo", 1));
        assertEquals((Character) 'b', table.get("bar", 1));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

            TreeMultimap.create(StringLength.COMPARATOR, DECREASING_INT_COMPARATOR);
        multimap.put("google", 2);
        multimap.put("google", 6);
        multimap.put(null, 3);
        multimap.put(null, 1);
        multimap.put(null, 7);
        multimap.put("tree", 0);
        multimap.put("tree", null);
        return multimap;
      }
    
      /** Test that a TreeMultimap created from another uses the natural ordering. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/HashBasedTableTest.java

        Table<String, Integer, Character> table = HashBasedTable.create();
        table.put("foo", 4, 'a');
        table.put("cat", 1, 'b');
        table.clear();
        populate(table, data);
        return table;
      }
    
      public void testIterationOrder() {
        Table<String, String, String> table = HashBasedTable.create();
        for (int i = 0; i < 5; i++) {
          table.put("r" + i, "c" + i, "v" + i);
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java

        try {
          table.put("foo", 1, 'a');
          fail("Expected UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
        }
        assertSize(0);
      }
    
      @Override
      public void testPutAllTable() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        Table<String, Integer, Character> other = HashBasedTable.create();
        other.put("foo", 1, 'd');
        other.put("bar", 2, 'e');
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/TableCollectors.java

        final Table<R, C, MutableCell<R, C, V>> table = HashBasedTable.create();
    
        void put(R row, C column, V value, BinaryOperator<V> merger) {
          MutableCell<R, C, V> oldCell = table.get(row, column);
          if (oldCell == null) {
            MutableCell<R, C, V> cell = new MutableCell<>(row, column, value);
            insertionOrder.add(cell);
            table.put(row, column, cell);
          } else {
            oldCell.merge(value, merger);
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Mar 09 00:21:17 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ForwardingSortedMapImplementsMapTest.java

      }
    
      @Override
      protected SortedMap<String, Integer> makePopulatedMap() {
        final SortedMap<String, Integer> sortedMap = makeEmptyMap();
        sortedMap.put("one", 1);
        sortedMap.put("two", 2);
        sortedMap.put("three", 3);
        return sortedMap;
      }
    
      @Override
      protected String getKeyNotInPopulatedMap() throws UnsupportedOperationException {
        return "minus one";
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/CompactLinkedHashMap.java

     * CompactLinkedHashMap is an implementation of a Map with insertion or LRU iteration order,
     * maintained with a doubly linked list through the entries. All optional operations (put and
     * remove) are supported. Null keys and values are supported.
     *
     * <p>{@code containsKey(k)}, {@code put(k, v)} and {@code remove(k)} are all (expected and
     * amortized) constant time operations. Expected in the hashtable sense (depends on the hash
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/AbstractTableTest.java

          } catch (UnsupportedOperationException expected) {
          }
        }
      }
    
      public void testPut() {
        assertNull(table.put("foo", 1, cellValue('a')));
        assertNull(table.put("bar", 1, cellValue('b')));
        assertNull(table.put("foo", 3, cellValue('c')));
        assertEquals((Character) 'a', table.put("foo", 1, cellValue('d')));
        assertEquals((Character) 'd', table.get("foo", 1));
        assertEquals((Character) 'b', table.get("bar", 1));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/SynchronizedTableTest.java

          assertTrue(Thread.holdsLock(mutex));
          return delegate.get(rowKey, columnKey);
        }
    
        @Override
        public @Nullable V put(R rowKey, C columnKey, V value) {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.put(rowKey, columnKey, value);
        }
    
        @Override
        public void putAll(Table<? extends R, ? extends C, ? extends V> table) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/AbstractMapsTransformValuesTest.java

        Map<String, Integer> underlying = Maps.newLinkedHashMap();
        underlying.put("a", 1);
        underlying.put("b", 2);
        underlying.put("c", 3);
        underlying.put("d", 4);
        underlying.put("e", 5);
        underlying.put("f", 6);
        underlying.put("g", 7);
        Map<String, String> map = Maps.transformValues(underlying, Functions.toStringFunction());
    
        map.remove("a");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top