public Iterable<Entity> getEdges() { MetaIterator<Entity> meta = null; for (Node pred : getProperties()) { Iterable<Entity> it = get(pred); if (meta == null) meta = new MetaIterator<Entity>(it); else meta.next(it); } return meta; }
Iterable<Entity> getNodes() { MetaIterator<Entity> meta = null; for (NodeTable gt : graph.values()) { if (meta == null) meta = new MetaIterator<Entity>(gt.values()); else meta.next(gt.values()); } if (meta == null) return new ArrayList<Entity>(); return meta; }