@Test public void testGetEdgesByVariables() { AsciiGraphLoader<EPGMGraphHead, EPGMVertex, EPGMEdge> asciiGraphLoader = AsciiGraphLoader.fromString("[()-[e]->()<-[f]-()]", getEPGMElementFactoryProvider()); validateCollections(asciiGraphLoader, 1, 3, 2); validateCaches(asciiGraphLoader, 0, 0, 2); Collection<EPGMEdge> edges = asciiGraphLoader .getEdgesByVariables("e", "f"); EPGMEdge e = asciiGraphLoader.getEdgeByVariable("e"); EPGMEdge f = asciiGraphLoader.getEdgeByVariable("f"); assertEquals("Wrong number of edges", 2, edges.size()); assertTrue("EPGMEdge was not contained in result", edges.contains(e)); assertTrue("EPGMEdge was not contained in result", edges.contains(f)); }
public Collection<E> getEdgesByVariables(String... variables) { Collection<E> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { E edge = edgeCache.get(variable); if (edge != null) { result.add(edge); } } return result; }
AsciiGraphLoader { public Collection<E> getEdgesByVariables(String... variables) { Collection<E> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { E edge = edgeCache.get(variable); if (edge != null) { result.add(edge); } } return result; } }
AsciiGraphLoader { public Collection<E> getEdgesByVariables(String... variables) { Collection<E> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { E edge = edgeCache.get(variable); if (edge != null) { result.add(edge); } } return result; } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); }
AsciiGraphLoader { public Collection<E> getEdgesByVariables(String... variables) { Collection<E> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { E edge = edgeCache.get(variable); if (edge != null) { result.add(edge); } } return result; } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromString(String asciiGraph,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromFile(String fileName,
                                     ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromStream(InputStream inputStream,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); void appendFromString(String asciiGraph); Collection<G> getGraphHeads(); G getGraphHeadByVariable(String variable); Collection<G> getGraphHeadsByVariables(String... variables); Collection<V> getVertices(); V getVertexByVariable(String variable); Collection<V> getVerticesByVariables(String... variables); Collection<V> getVerticesByGraphIds(GradoopIdSet graphIds); Collection<V> getVerticesByGraphVariables(String... graphVariables); Collection<E> getEdges(); E getEdgeByVariable(String variable); Collection<E> getEdgesByVariables(String... variables); Collection<E> getEdgesByGraphIds(GradoopIdSet graphIds); Collection<E> getEdgesByGraphVariables(String... variables); Map<String, G> getGraphHeadCache(); Map<String, V> getVertexCache(); Map<String, E> getEdgeCache(); }
AsciiGraphLoader { public Collection<E> getEdgesByVariables(String... variables) { Collection<E> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { E edge = edgeCache.get(variable); if (edge != null) { result.add(edge); } } return result; } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromString(String asciiGraph,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromFile(String fileName,
                                     ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromStream(InputStream inputStream,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); void appendFromString(String asciiGraph); Collection<G> getGraphHeads(); G getGraphHeadByVariable(String variable); Collection<G> getGraphHeadsByVariables(String... variables); Collection<V> getVertices(); V getVertexByVariable(String variable); Collection<V> getVerticesByVariables(String... variables); Collection<V> getVerticesByGraphIds(GradoopIdSet graphIds); Collection<V> getVerticesByGraphVariables(String... graphVariables); Collection<E> getEdges(); E getEdgeByVariable(String variable); Collection<E> getEdgesByVariables(String... variables); Collection<E> getEdgesByGraphIds(GradoopIdSet graphIds); Collection<E> getEdgesByGraphVariables(String... variables); Map<String, G> getGraphHeadCache(); Map<String, V> getVertexCache(); Map<String, E> getEdgeCache();  }