fail("Edges should not be accessible in MapReduce.map()"); } catch (final UnsupportedOperationException e) { assertEquals(GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce().getMessage(), e.getMessage()); fail("Edges should not be accessible in MapReduce.map()"); } catch (final UnsupportedOperationException e) { assertEquals(GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce().getMessage(), e.getMessage()); fail("Edges should not be accessible in MapReduce.map()"); } catch (final UnsupportedOperationException e) { assertEquals(GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce().getMessage(), e.getMessage());
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().vertices(direction, edgeLabels), v -> v.equals(starVertex) ? starVertex : new ComputerAdjacentVertex(v)); }
fail("Edges should not be accessible in MapReduce.map()"); } catch (final UnsupportedOperationException e) { assertEquals(GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce().getMessage(), e.getMessage()); fail("Edges should not be accessible in MapReduce.map()"); } catch (final UnsupportedOperationException e) { assertEquals(GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce().getMessage(), e.getMessage()); fail("Edges should not be accessible in MapReduce.map()"); } catch (final UnsupportedOperationException e) { assertEquals(GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce().getMessage(), e.getMessage());
@Override public Iterator<Edge> edges(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().edges(direction, edgeLabels), ComputerEdge::new); }
@Override public Edge addEdge(final String label, final Vertex inVertex, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return new ComputerEdge(this.getBaseVertex().addEdge(label, inVertex, keyValues)); }
@Override public final void accessEdges() { throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); }
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().vertices(direction, edgeLabels), v -> v.equals(starVertex) ? starVertex : new ComputerAdjacentVertex(v)); }
@Override public Iterator<Edge> edges(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().edges(direction, edgeLabels), ComputerEdge::new); }
@Override public Edge addEdge(final String label, final Vertex inVertex, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return new ComputerEdge(this.getBaseVertex().addEdge(label, inVertex, keyValues)); }
@Override public final void accessEdges() { throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); }
@Override public final void accessEdges() { throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); }