log.trace("Vertex {} has unknown lifecycle state", vertexId); return null; } else if (!tv.edges(Direction.BOTH).hasNext() && !tv.properties().hasNext()) { log.trace("Vertex {} has no relations", vertexId); return null;
@Override public void remove() { final List<Edge> edges = new ArrayList<>(); this.edges(Direction.BOTH).forEachRemaining(edges::add); edges.stream().filter(edge -> !((TinkerEdge) edge).removed).forEach(Edge::remove); this.properties = null; TinkerHelper.removeElementIndex(this); this.graph.vertices.remove(this.id); this.removed = true; }
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { return TinkerHelper.inComputerMode(this.graph) ? direction.equals(Direction.BOTH) ? IteratorUtils.concat( IteratorUtils.map(this.edges(Direction.OUT, edgeLabels), Edge::inVertex), IteratorUtils.map(this.edges(Direction.IN, edgeLabels), Edge::outVertex)) : IteratorUtils.map(this.edges(direction, edgeLabels), edge -> edge.vertices(direction.opposite()).next()) : (Iterator) TinkerHelper.getVertices(this, direction, edgeLabels); }
@Override public void remove() { final List<Edge> edges = new ArrayList<>(); this.edges(Direction.BOTH).forEachRemaining(edges::add); edges.stream().filter(edge -> !((TinkerEdge) edge).removed).forEach(Edge::remove); this.properties = null; TinkerHelper.removeElementIndex(this); this.graph.vertices.remove(this.id); this.removed = true; }
@Override public void remove() { final List<Edge> edges = new ArrayList<>(); this.edges(Direction.BOTH).forEachRemaining(edges::add); edges.stream().filter(edge -> !((TinkerEdge) edge).removed).forEach(Edge::remove); this.properties = null; TinkerHelper.removeElementIndex(this); this.graph.vertices.remove(this.id); this.removed = true; }
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { return TinkerHelper.inComputerMode(this.graph) ? direction.equals(Direction.BOTH) ? IteratorUtils.concat( IteratorUtils.map(this.edges(Direction.OUT, edgeLabels), Edge::inVertex), IteratorUtils.map(this.edges(Direction.IN, edgeLabels), Edge::outVertex)) : IteratorUtils.map(this.edges(direction, edgeLabels), edge -> edge.vertices(direction.opposite()).next()) : (Iterator) TinkerHelper.getVertices(this, direction, edgeLabels); }
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { return TinkerHelper.inComputerMode(this.graph) ? direction.equals(Direction.BOTH) ? IteratorUtils.concat( IteratorUtils.map(this.edges(Direction.OUT, edgeLabels), Edge::inVertex), IteratorUtils.map(this.edges(Direction.IN, edgeLabels), Edge::outVertex)) : IteratorUtils.map(this.edges(direction, edgeLabels), edge -> edge.vertices(direction.opposite()).next()) : (Iterator) TinkerHelper.getVertices(this, direction, edgeLabels); }
if (!tv.edges(Direction.BOTH).hasNext() && !tv.properties().hasNext()) { log.trace("Vertex {} has no relations", vertexId); return null;
log.trace("Vertex {} has unknown lifecycle state", vertexId); return null; } else if (!tv.edges(Direction.BOTH).hasNext() && !tv.properties().hasNext()) { log.trace("Vertex {} has no relations", vertexId); return null;
if (!tv.edges(Direction.BOTH).hasNext() && !tv.properties().hasNext()) { log.trace("Vertex {} has no relations", vertexId); return null;