ColumnStore implements ColumnIterable { public void clear() { lock(); try { if (graphStore != null) { List<Column> cols = toList(); int[] indices = new int[cols.size()]; for (int i = 0; i < indices.length; i++) { indices[i] = cols.get(i).getIndex(); } if (graphStore.nodeTable.store == this) { for (Node n : graphStore.nodeStore) { Object[] atts = ((NodeImpl) n).attributes; for (int i = 0; i < indices.length; i++) { atts[indices[i]] = null; } } } else { for (Edge e : graphStore.edgeStore) { Object[] atts = ((EdgeImpl) e).attributes; for (int i = 0; i < indices.length; i++) { atts[indices[i]] = null; } } } } garbageQueue.clear(); idMap.clear(); length = 0; Arrays.fill(columns, null); if (indexStore != null) { indexStore.clear(); } } finally { unlock(); } } ColumnStore(Class<T> elementType, boolean indexed);  ColumnStore(GraphStore graphStore, Class<T> elementType, boolean indexed); void addColumn(final Column column); void removeColumn(final Column column); void removeColumn(final String key); int getColumnIndex(final String key); Column getColumnByIndex(final int index); Column getColumn(final String key); boolean hasColumn(String key); @Override Iterator<Column> iterator(); @Override ColumnImpl[] toArray(); @Override List<Column> toList(); @Override void doBreak(); Set<String> getColumnKeys(); void clear(); int size(); boolean deepEquals(ColumnStore<T> obj); int deepHashCode();  }
@Test public void testClear() { ColumnStore<Node> store = new ColumnStore(Node.class, false); ColumnImpl col = new ColumnImpl("0", Integer.class, null, null, Origin.DATA, false, false); store.addColumn(col); store.clear(); Assert.assertFalse(store.hasColumn("0")); Assert.assertEquals(store.size(), 0); }