@Test public void testClear() { NodeStore nodeStore = new NodeStore(); nodeStore.clear(); NodeImpl node = new NodeImpl("0"); nodeStore.add(node); nodeStore.clear(); Assert.assertTrue(nodeStore.isEmpty()); Assert.assertEquals(nodeStore.size(), 0); Assert.assertFalse(nodeStore.contains(node)); Assert.assertEquals(node.getStoreId(), NodeStore.NULL_ID); }
@Override public void clear() { if (!isEmpty()) { incrementVersion(); } for (NodeStoreIterator itr = new NodeStoreIterator(); itr.hasNext();) { NodeImpl node = itr.next(); node.setStoreId(NodeStore.NULL_ID); } initStore(); }
NodeStore implements Collection<Node>, NodeIterable { @Override public void clear() { if (!isEmpty()) { incrementVersion(); } for (NodeStoreIterator itr = new NodeStoreIterator(); itr.hasNext();) { NodeImpl node = itr.next(); node.setStoreId(NodeStore.NULL_ID); } initStore(); } }
NodeStore implements Collection<Node>, NodeIterable { @Override public void clear() { if (!isEmpty()) { incrementVersion(); } for (NodeStoreIterator itr = new NodeStoreIterator(); itr.hasNext();) { NodeImpl node = itr.next(); node.setStoreId(NodeStore.NULL_ID); } initStore(); } NodeStore();  NodeStore(final EdgeStore edgeStore, final GraphLock lock, final GraphViewStore viewStore, final GraphVersion graphVersion); }
NodeStore implements Collection<Node>, NodeIterable { @Override public void clear() { if (!isEmpty()) { incrementVersion(); } for (NodeStoreIterator itr = new NodeStoreIterator(); itr.hasNext();) { NodeImpl node = itr.next(); node.setStoreId(NodeStore.NULL_ID); } initStore(); } NodeStore();  NodeStore(final EdgeStore edgeStore, final GraphLock lock, final GraphViewStore viewStore, final GraphVersion graphVersion); NodeImpl get(final int id); NodeImpl get(final Object id); @Override void clear(); @Override int size(); @Override boolean isEmpty(); @Override NodeStoreIterator iterator(); @Override NodeImpl[] toArray(); @Override T[] toArray(T[] array); @Override Collection<Node> toCollection(); @Override boolean add(final Node n); @Override boolean remove(final Object o); @Override boolean contains(final Object o); boolean containsId(final Object id); @Override boolean containsAll(final Collection<?> c); @Override boolean addAll(final Collection<? extends Node> c); @Override boolean removeAll(final Collection<?> c); @Override boolean retainAll(final Collection<?> c); int deepHashCode(); boolean deepEquals(NodeStore obj); @Override void doBreak(); }
NodeStore implements Collection<Node>, NodeIterable { @Override public void clear() { if (!isEmpty()) { incrementVersion(); } for (NodeStoreIterator itr = new NodeStoreIterator(); itr.hasNext();) { NodeImpl node = itr.next(); node.setStoreId(NodeStore.NULL_ID); } initStore(); } NodeStore();  NodeStore(final EdgeStore edgeStore, final GraphLock lock, final GraphViewStore viewStore, final GraphVersion graphVersion); NodeImpl get(final int id); NodeImpl get(final Object id); @Override void clear(); @Override int size(); @Override boolean isEmpty(); @Override NodeStoreIterator iterator(); @Override NodeImpl[] toArray(); @Override T[] toArray(T[] array); @Override Collection<Node> toCollection(); @Override boolean add(final Node n); @Override boolean remove(final Object o); @Override boolean contains(final Object o); boolean containsId(final Object id); @Override boolean containsAll(final Collection<?> c); @Override boolean addAll(final Collection<? extends Node> c); @Override boolean removeAll(final Collection<?> c); @Override boolean retainAll(final Collection<?> c); int deepHashCode(); boolean deepEquals(NodeStore obj); @Override void doBreak();  }