Skip to content

Instantly share code, notes, and snippets.

@okram
Created May 14, 2012 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okram/2697271 to your computer and use it in GitHub Desktop.
Save okram/2697271 to your computer and use it in GitHub Desktop.
package com.tinkerpop.blueprints;
/**
* A vertex maintains pointers to both a set of incoming and outgoing edges.
* The outgoing edges are those edges for which the vertex is the tail.
* The incoming edges are those edges for which the vertex is the head.
* Diagrammatically, ---inEdges---> vertex ---outEdges--->.
*
* @author Marko A. Rodriguez (http://markorodriguez.com)
* @author Matthias Brocheler (http://matthiasb.com)
*/
public interface Vertex extends Element {
/**
* Return the edges incident to the vertex according to the provided direction and edge labels.
*
* @param direction the direction of the edges to retrieve
* @param labels the labels of the edges to retrieve
* @return an iterable of incident edges
*/
public Iterable<Edge> getEdges(Direction direction, String... labels);
/**
* Return the vertices adjacent to the vertex according to the provided direction and edge labels.
*
* @param direction the direction of the edges of the adjacent vertices
* @param labels the labels of the edges of the adjacent vertices
* @return an iterable of adjacent vertices
*/
public Iterable<Vertex> getVertices(Direction direction, String... labels);
/**
* Generate a query object that can be used to fine tune which edges/vertices are retrieved that are incident/adjacent to this vertex.
*
* @return a vertex query object with methods for constraining which data is pulled from the underlying graph
*/
public Query query();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment