public void copyTo(NameIndex nameIndex) { names.copyTo(nameIndex.names); } }
@Override public GraphExtension copyTo(GraphExtension clonedStorage) { if (!(clonedStorage instanceof TurnCostExtension)) { throw new IllegalStateException("the extended storage to clone must be the same"); } TurnCostExtension clonedTC = (TurnCostExtension) clonedStorage; turnCosts.copyTo(clonedTC.turnCosts); clonedTC.turnCostsCount = turnCostsCount; return clonedStorage; }
index.copyTo(indexCopy); filledIndices.copyTo(indicesCopy); initializedCounter = filledIndices.getCardinality();
@Test public void testCopy() { DataAccess da1 = createDataAccess(name); da1.create(1001 * 4); da1.setHeader(4, 12); da1.setInt(1 * 4, 1); da1.setInt(123 * 4, 321); da1.setInt(1000 * 4, 1111); DataAccess da2 = createDataAccess(name + "2"); da2.create(10); da1.copyTo(da2); assertEquals(12, da2.getHeader(4)); assertEquals(1, da2.getInt(1 * 4)); assertEquals(321, da2.getInt(123 * 4)); assertEquals(1111, da2.getInt(1000 * 4)); da2.setInt(1 * 4, 2); assertEquals(2, da2.getInt(1 * 4)); da2.flush(); da1.flush(); // make sure they are independent! assertEquals(1, da1.getInt(1 * 4)); da1.close(); da2.close(); }
public void copyTo( NameIndex nameIndex ) { names.copyTo(nameIndex.names); } }
@Override public synchronized DataAccess copyTo( DataAccess da ) { return inner.copyTo(da); }
public void copyTo(NameIndex nameIndex) { names.copyTo(nameIndex.names); } }
public void copyTo(NameIndex nameIndex) { names.copyTo(nameIndex.names); } }
@Override public synchronized DataAccess copyTo(DataAccess da) { return inner.copyTo(da); }
@Override public GraphExtension copyTo(GraphExtension clonedStorage) { if (!(clonedStorage instanceof TurnCostExtension)) { throw new IllegalStateException("the extended storage to clone must be the same"); } TurnCostExtension clonedTC = (TurnCostExtension) clonedStorage; turnCosts.copyTo(clonedTC.turnCosts); clonedTC.turnCostsCount = turnCostsCount; return clonedStorage; }
@Override public GraphExtension copyTo( GraphExtension clonedStorage ) { if (!(clonedStorage instanceof TurnCostExtension)) { throw new IllegalStateException("the extended storage to clone must be the same"); } TurnCostExtension clonedTC = (TurnCostExtension) clonedStorage; turnCosts.copyTo(clonedTC.turnCosts); clonedTC.turnCostsCount = turnCostsCount; return clonedStorage; }
@Override public GraphExtension copyTo(GraphExtension clonedStorage) { if (!(clonedStorage instanceof TurnCostExtension)) { throw new IllegalStateException("the extended storage to clone must be the same"); } TurnCostExtension clonedTC = (TurnCostExtension) clonedStorage; turnCosts.copyTo(clonedTC.turnCosts); clonedTC.turnCostsCount = turnCostsCount; return clonedStorage; }
public void copyTo( StorableProperties properties ) { properties.map.clear(); properties.map.putAll(map); da.copyTo(properties.da); }