ColumnStore implements ColumnIterable { public boolean deepEquals(ColumnStore<T> obj) { if (obj == null) { return false; } if (this.elementType != obj.elementType && (this.elementType == null || !this.elementType .equals(obj.elementType))) { return false; } Iterator<Column> itr1 = this.iterator(); Iterator<Column> itr2 = obj.iterator(); while (itr1.hasNext()) { if (!itr2.hasNext()) { return false; } Column c1 = itr1.next(); Column c2 = itr2.next(); if (!c1.equals(c2)) { return false; } } return true; } 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 testDeepEqualsEmpty() { ColumnStore<Node> store1 = new ColumnStore<Node>(Node.class, false); Assert.assertTrue(store1.deepEquals(store1)); ColumnStore<Node> store2 = new ColumnStore<Node>(Node.class, false); Assert.assertTrue(store1.deepEquals(store2)); }
@Test public void testDeepEquals() { ColumnStore<Node> store1 = new ColumnStore<Node>(Node.class, false); ColumnImpl col1 = new ColumnImpl("0", Integer.class, null, null, Origin.DATA, false, false); store1.addColumn(col1); ColumnStore<Node> store2 = new ColumnStore<Node>(Node.class, false); ColumnImpl col2 = new ColumnImpl("0", Integer.class, null, null, Origin.DATA, false, false); store2.addColumn(col2); Assert.assertTrue(store1.deepEquals(store2)); ColumnStore<Node> store3 = new ColumnStore<Node>(Node.class, false); ColumnImpl col3 = new ColumnImpl("0", String.class, null, null, Origin.DATA, false, false); store3.addColumn(col3); Assert.assertFalse(store1.deepEquals(store3)); }