@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { synchronized (mutex) { delegate().putAll(table); } }
@Override public synchronized void putAll(Table<? extends R, ? extends C, ? extends V> table) { wrapped.putAll(table); }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { synchronized (mutex) { delegate().putAll(table); } }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { delegate().putAll(table); }
@Override public void putAll(Table<? extends C, ? extends R, ? extends V> table) { original.putAll(transpose(table)); }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { delegate().putAll(table); }
@Override public void putAll(Table<? extends C, ? extends R, ? extends V> table) { original.putAll(transpose(table)); }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { assertTrue(Thread.holdsLock(mutex)); delegate.putAll(table); }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { synchronized (mutex) { delegate().putAll(table); } }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { delegate().putAll(table); }
private synchronized void putAll(@Nullable Table<String, String, Object> attributes) { if (attributes != null && this.attributes != attributes) { if (this.attributes == null) { this.attributes = HashBasedTable.create(); } this.attributes.putAll(attributes); } }
@Override public void putAll(Table<? extends C, ? extends R, ? extends V> table) { original.putAll(transpose(table)); }
@Override <R extends Comparable<R>, C extends Comparable<C>, V> Table<R, C, V> create( Table<R, C, V> contents) { Table<R, C, V> table = TreeBasedTable.create(); table.putAll(contents); return table; } },
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'); other.put("cat", 2, 'f'); table.putAll(other); assertEquals((Character) 'd', table.get("foo", 1)); assertEquals((Character) 'b', table.get("bar", 1)); assertEquals((Character) 'c', table.get("foo", 3)); assertEquals((Character) 'e', table.get("bar", 2)); assertEquals((Character) 'f', table.get("cat", 2)); assertSize(5); }
public final void testPutAll() { for (Table<Character, Integer, String> testInstance : getTestInstances()) { try { testInstance.putAll(ImmutableTable.of('a', 1, "blah")); fail(); } catch (UnsupportedOperationException e) { // success } } }
@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'); other.put("cat", 2, 'f'); try { table.putAll(other); fail("Expected UnsupportedOperationException"); } catch (UnsupportedOperationException expected) { } assertEquals((Character) 'a', table.get("foo", 1)); assertEquals((Character) 'b', table.get("bar", 1)); assertEquals((Character) 'c', table.get("foo", 3)); assertSize(3); }
private synchronized void putAll(@Nullable Table<String, String, Object> attributes) { if (attributes != null && this.attributes != attributes) { if (this.attributes == null) { this.attributes = HashBasedTable.create(); } this.attributes.putAll(attributes); } }
/** * Create a new graph with initial data. * @param table The table that is copied into the graph. */ public TableGraph(Table<Point, Point, Connection<E>> table) { data = Tables.newCustomTable( new LinkedHashMap<Point, Map<Point, Connection<E>>>(), new LinkedHashMapFactory<Connection<E>>()); data.putAll(table); }
private Table<String, String, SymbolEntry> getAllSymbols() { Table<String, String, SymbolEntry> symbols = HashBasedTable.create(); for (SymbolLoader symbolLoader : mSymbols) { symbols.putAll(symbolLoader.getSymbols()); } return symbols; }
@Override public void putAll(Table<? extends R, ? extends C, ? extends V> table) { assertTrue(Thread.holdsLock(mutex)); delegate.putAll(table); }