Modifier and Type | Method and Description |
---|---|
<L extends Link> |
addLink(long vertexID,
java.lang.Class<L> clazz)
Vertex.addLink(long, Class, Consumer) without a data injector so no initial function is
run for links. |
<L extends Link> |
addLink(long vertexID,
java.lang.Class<L> clazz,
java.util.function.Consumer<L> dataInjector)
Create a new link from this vertex to the target vertexID, with the given associated data.
|
<L extends Link> |
addLinks(java.util.Collection<java.lang.Long> vertexIDs,
java.lang.Class<L> clazz)
Vertex.addLinks(Collection, Class) without a data injector so no initial function is
run for links. |
<L extends Link> |
addLinks(java.util.Collection<java.lang.Long> vertexIDs,
java.lang.Class<L> clazz,
java.util.function.Consumer<L> dataInjector)
Create a new link from this vertex to a group of target vertexIDs, with the given associated
data.
|
java.util.List<? extends Link> |
getLinks()
Get all of the vertex's links.
|
<L extends Link> |
getLinks(java.lang.Class<L> clazz)
Get the vertex's links of the given type.
|
FilteredLinks<? extends Link> |
getLinksTo(long targetID)
Get the vertex's links to the given target ID.
|
<L extends Link> |
getLinksTo(long targetID,
java.lang.Class<L> clazz)
Get the vertex's links of specified class to the given target ID.
|
boolean |
hasLinks(java.lang.Class<? extends Link> clazz) |
boolean |
hasLinksTo(long targetID) |
boolean |
hasLinksTo(long targetID,
java.lang.Class<? extends Link> clazz) |
void |
removeLinks()
Removes all the vertex's links.
|
void |
removeLinks(java.lang.Class<? extends Link> clazz)
Removes all vertex's links of a given type.
|
void |
removeLinksTo(long targetID)
Removes the vertex's links to a certain target ID.
|
void |
removeLinksTo(long targetID,
java.lang.Class<? extends Link> clazz)
Removes the vertex's links to a certain targetID of a given type.
|
<L extends Link> FilteredLinks<L> getLinks(java.lang.Class<L> clazz)
clazz
- The link data class.Link
s of the given class.java.util.List<? extends Link> getLinks()
Note that without a specific link class, data for the link will not be accessible.
FilteredLinks<? extends Link> getLinksTo(long targetID)
targetID
- The target vertex ID.Link
s to the given target<L extends Link> FilteredLinks<L> getLinksTo(long targetID, java.lang.Class<L> clazz)
targetID
- The target vertex ID.clazz
- The link data classLink
s to the given targetvoid removeLinks()
void removeLinks(java.lang.Class<? extends Link> clazz)
clazz
- The link data class.void removeLinksTo(long targetID)
targetID
- ID of the vertex you want to remove the link to.boolean hasLinksTo(long targetID)
targetID
- The target vertex ID.Link
s to vertex with given targetID.boolean hasLinks(java.lang.Class<? extends Link> clazz)
clazz
- The link data classLink
s of specified class to other vertices.boolean hasLinksTo(long targetID, java.lang.Class<? extends Link> clazz)
targetID
- The target vertex ID.clazz
- The link data classLink
s of specified class to vertex with given targetID.void removeLinksTo(long targetID, java.lang.Class<? extends Link> clazz)
clazz
- The link data class.targetID
- ID of the vertex you want to remove the link to.<L extends Link> L addLink(long vertexID, java.lang.Class<L> clazz)
Vertex.addLink(long, Class, Consumer)
without a data injector so no initial function is
run for links.<L extends Link> java.util.List<L> addLinks(java.util.Collection<java.lang.Long> vertexIDs, java.lang.Class<L> clazz)
Vertex.addLinks(Collection, Class)
without a data injector so no initial function is
run for links.<L extends Link> java.util.List<L> addLinks(java.util.Collection<java.lang.Long> vertexIDs, java.lang.Class<L> clazz, java.util.function.Consumer<L> dataInjector)
vertexIDs
- Collection of IDs of the vertex to link to.dataInjector
- Function run when each link is created which can be used to set its values.<L extends Link> L addLink(long vertexID, java.lang.Class<L> clazz, java.util.function.Consumer<L> dataInjector)
vertexID
- ID of the vertex to link to.dataInjector
- Function run when each link is created which can be used to set its values.