@Test public void testGetVerticesByVariables() { AsciiGraphLoader<EPGMGraphHead, EPGMVertex, EPGMEdge> asciiGraphLoader = AsciiGraphLoader.fromString("[(a),(b),(a)]", getEPGMElementFactoryProvider()); validateCollections(asciiGraphLoader, 1, 2, 0); validateCaches(asciiGraphLoader, 0, 2, 0); Collection<EPGMVertex> vertexs = asciiGraphLoader .getVerticesByVariables("a", "b"); EPGMVertex a = asciiGraphLoader.getVertexByVariable("a"); EPGMVertex b = asciiGraphLoader.getVertexByVariable("b"); assertEquals("Wrong number of vertices", 2, vertexs.size()); assertTrue("EPGMVertex was not contained in result", vertexs.contains(a)); assertTrue("EPGMVertex was not contained in result", vertexs.contains(b)); }
public Collection<V> getVerticesByVariables(String... variables) { Collection<V> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { V vertex = getVertexByVariable(variable); if (vertex != null) { result.add(vertex); } } return result; }
AsciiGraphLoader { public Collection<V> getVerticesByVariables(String... variables) { Collection<V> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { V vertex = getVertexByVariable(variable); if (vertex != null) { result.add(vertex); } } return result; } }
AsciiGraphLoader { public Collection<V> getVerticesByVariables(String... variables) { Collection<V> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { V vertex = getVertexByVariable(variable); if (vertex != null) { result.add(vertex); } } return result; } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); }
AsciiGraphLoader { public Collection<V> getVerticesByVariables(String... variables) { Collection<V> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { V vertex = getVertexByVariable(variable); if (vertex != null) { result.add(vertex); } } 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<V> getVerticesByVariables(String... variables) { Collection<V> result = Sets.newHashSetWithExpectedSize(variables.length); for (String variable : variables) { V vertex = getVertexByVariable(variable); if (vertex != null) { result.add(vertex); } } 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();  }