de.grogra.graph.impl
public final class Extent extends java.lang.Object
Extent keeps track of all nodes of a specific class in a
GraphManager. This is used to efficiently
obtain all nodes which are instances of some given class.| Modifier and Type | Method and Description |
|---|---|
Node |
getFirstNode(int extentIndex)
Returns the first node of the
extentIndex-th
linked list of nodes which constitute this extent. |
Node |
getNextNode(Node prev)
Returns the node following
prev in the linked list of
nodes which constitute this extent. |
void |
getSubExtents(java.util.Collection<? super Extent> list)
Adds all direct subextents of this extent to
list. |
Type |
getType()
Returns the type of which the nodes of this extent are.
|
int |
size()
Returns the current size of this extent excluding subextents,
i.e., the number of nodes belonging to this extent only.
|
java.lang.String |
toString() |
int |
totalSize()
Returns the current size of this extent including subextents,
i.e., the number of nodes belonging to this extent and subextents.
|
public Node getFirstNode(int extentIndex)
extentIndex-th
linked list of nodes which constitute this extent.extentIndex-th linked list of this extentgetNextNode(Node)public Node getNextNode(Node prev)
prev in the linked list of
nodes which constitute this extent.prev in linked list of this extentgetFirstNode(int)public void getSubExtents(java.util.Collection<? super Extent> list)
list. Direct
subextents are the extents of direct subtypes of the type of this
extent.list - list to which subextents are addedpublic Type getType()
public int size()
public java.lang.String toString()
toString in class java.lang.Objectpublic int totalSize()