@Override public synchronized boolean containsRow(Object rowKey) { return wrapped.containsRow(rowKey); }
@Override public boolean containsRow(Object rowKey) { return delegate().containsRow(rowKey); }
@Override public boolean containsColumn(@Nullable Object columnKey) { return original.containsRow(columnKey); }
@Override public boolean containsRow(@NullableDecl Object rowKey) { synchronized (mutex) { return delegate().containsRow(rowKey); } }
@Override public boolean containsColumn(@NullableDecl Object columnKey) { return original.containsRow(columnKey); }
@Override public boolean containsRow(@Nullable Object rowKey) { synchronized (mutex) { return delegate().containsRow(rowKey); } }
@Override public boolean containsRow(Object rowKey) { return delegate().containsRow(rowKey); }
@Override public boolean containsRow(Object rowKey) { assertTrue(Thread.holdsLock(mutex)); return delegate.containsRow(rowKey); }
@Override public boolean containsColumn(@NullableDecl Object columnKey) { return original.containsRow(columnKey); }
@Override public boolean containsRow(Object rowKey) { return delegate().containsRow(rowKey); }
public synchronized Map<String, ConsumeQueue> getBySubject(final String subject) { if (queues.containsRow(subject)) { return queues.row(subject); } else { return Collections.emptyMap(); } }
@Override public void testContainsRow() { table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c'); assertTrue(table.containsRow("foo")); assertTrue(table.containsRow("bar")); assertTrue(table.containsRow("cat")); assertFalse(table.containsRow("bad")); assertFalse(table.containsRow(null)); }
public void testContainsRow() { table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c'); assertTrue(table.containsRow("foo")); assertTrue(table.containsRow("bar")); assertFalse(table.containsRow("cat")); assertFalse(table.containsRow(null)); }
@Override public boolean containsRow(@NullableDecl Object rowKey) { synchronized (mutex) { return delegate().containsRow(rowKey); } }
/** * Call the extension point(s) corresponding to the given id * * This iteration was isolated here to protect against ConcurrentModificationException using PluginRegistry's lock * * @param log log channel to pass to extension point call * @param id the id of the extension point interface * @param object object to pass to extension point call */ public void callExtensionPoint( LogChannelInterface log, String id, Object object ) throws KettleException { lock.readLock().lock(); try { if ( extensionPointPluginMap.containsRow( id ) && !extensionPointPluginMap.rowMap().get( id ).values().isEmpty() ) { for ( Supplier<ExtensionPointInterface> extensionPoint : extensionPointPluginMap.row( id ).values() ) { extensionPoint.get().callExtensionPoint( log, object ); } } } finally { lock.readLock().unlock(); } }
/** * Hide or unhide widgets depending on widgetsToHide */ private void processWidgets() { WeaponType equippedWeaponType = WeaponType.getWeaponType(equippedWeaponTypeVarbit); if (widgetsToHide.containsRow(equippedWeaponType)) { for (WidgetInfo widgetKey : widgetsToHide.row(equippedWeaponType).keySet()) { hideWidget(client.getWidget(widgetKey), widgetsToHide.get(equippedWeaponType, widgetKey)); } } }
@NoWarning(value="GC") public static void testTableOK(Table<String, Integer, Long> t) { t.contains("x", 1); t.containsRow("x"); t.containsColumn(1); t.containsValue(1L); t.get("x", 1); t.remove("x", 1); }
@ExpectWarning(value="GC", num=9) public static void testTable(Table<String, Integer, Long> t) { t.contains("x", "x"); t.contains(1, 1); t.containsRow(1); t.containsColumn("x"); t.containsValue(1); t.get("x", "x"); t.get(1, 1); t.remove("x", "x"); t.remove(1, 1); }
private void construct(Table<Integer, Integer, ? extends Number> dataTable, boolean transpose) { if (transpose) { Table<Integer, Integer, Double> colDataTable = HashBasedTable.create(); for (Table.Cell<Integer, Integer, ? extends Number> cell : dataTable.cellSet()) { colDataTable.put(cell.getColumnKey(), cell.getRowKey(), cell.getValue().doubleValue()); } dataTable = colDataTable; } for (int rowIndex = 0; rowIndex < rowSize(); rowIndex++) { if (dataTable.containsRow(rowIndex)) { rowVectors[rowIndex] = new VectorBasedSequentialSparseVector(columnSize(), dataTable.row(rowIndex)); } else { rowVectors[rowIndex] = new VectorBasedSequentialSparseVector(columnSize()); } } }
public void testClear() { table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c'); if (supportsRemove()) { table.clear(); assertEquals(0, table.size()); assertFalse(table.containsRow("foo")); } else { try { table.clear(); fail(); } catch (UnsupportedOperationException expected) { } } }