public interface VertexList extends Iterable<TitanVertex>
TitanVertexs.
Basic interface for a list of vertices which supports retrieving individuals vertices or iterating over all of them,
but does not support modification.
VertexList is returned by TitanVertexQuery. Depending on how the query was executed that returned this VertexList,
getting vertex ids might be significantly faster than retrieving vertex objects.| Modifier and Type | Method and Description |
|---|---|
TitanVertex |
get(int pos)
Returns the vertex at a given position in the list.
|
long |
getID(int pos)
Returns the id of the vertex at the specified position
|
com.carrotsearch.hppc.LongArrayList |
getIDs()
Returns a list of ids of all vertices in this list of vertices in the same order of the original vertex list.
|
boolean |
isSorted()
Whether this list of vertices is sorted by id in increasing order.
|
int |
size()
Returns the number of vertices in this list.
|
void |
sort()
Sorts this list according to vertex ids in increasing order.
|
VertexList |
subList(int fromPosition,
int length)
Returns a sub list of this list of vertices from the given position with the given number of vertices.
|
forEach, iterator, spliteratorint size()
TitanVertex get(int pos)
pos - Position for which to retrieve the vertex.void sort()
UnsupportedOperationException - If not all vertices in this list have an idboolean isSorted()
VertexList subList(int fromPosition, int length)
fromPosition - length - com.carrotsearch.hppc.LongArrayList getIDs()
LongArrayListlong getID(int pos)
pos - The position of the vertex in the listCopyright © 2012–2015. All rights reserved.