Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.graph.impl
Class Extent

    java.lang.Object
      de.grogra.graph.impl.Extent

    public final class Extent

extends java.lang.Object

An `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.

Author:
  Ole Kniemeyer

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getFirstNode

    public Node getFirstNode(int extentIndex)

  Returns the first node of the `extentIndex`-th linked list of nodes which constitute this extent.

  Returns:
    first node of `extentIndex`-th linked list of this extent
  See Also:
    `getNextNode(Node)`

### getNextNode

    public Node getNextNode(Node prev)

  Returns the node following `prev` in the linked list of nodes which constitute this extent.

  Returns:
    node following `prev` in linked list of this extent
  See Also:
    `getFirstNode(int)`

### getSubExtents

    public void getSubExtents(java.util.Collection<? super Extent> list)

  Adds all direct subextents of this extent to `list`. Direct subextents are the extents of direct subtypes of the type of this extent.

  Parameters:
    `list` - list to which subextents are added

### getType

    public Type getType()

  Returns the type of which the nodes of this extent are. Note that nodes of subtypes are not included.

  Returns:
    type of nodes of this extent

### size

    public int size()

  Returns the current size of this extent excluding subextents, i.e., the number of nodes belonging to this extent only.

  Returns:

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### totalSize

    public int totalSize()

  Returns the current size of this extent including subextents, i.e., the number of nodes belonging to this extent and subextents.

  Returns:
    size of this extent including subextents

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD