public interface VertexList extends Iterable<JanusGraphVertex>
JanusGraphVertex
s.
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 JanusGraphVertexQuery
. 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 |
---|---|
JanusGraphVertex |
get(int pos)
Returns the vertex at a given position in the list.
|
Object |
getID(int pos)
Returns the id of the vertex at the specified position
|
List<Object> |
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, spliterator
int size()
JanusGraphVertex 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
- List<Object> getIDs()
Object getID(int pos)
pos
- The position of the vertex in the listCopyright © 2012–2023. All rights reserved.