jetbrains.buildServer.util.graph
Class EmptyLinearDag

java.lang.Object
  extended by jetbrains.buildServer.util.graph.DAG<java.lang.Long>
      extended by jetbrains.buildServer.util.graph.BaseModificationDAG
          extended by jetbrains.buildServer.util.graph.EmptyLinearDag

public class EmptyLinearDag
extends BaseModificationDAG

Author:
dmitry.neverov

Constructor Summary
EmptyLinearDag()
           
 
Method Summary
 boolean containsNode(java.lang.Long node)
          Check if graph contains specified node
 java.util.Set<java.lang.Long> getAllNodes()
           
 java.util.List<java.lang.Long> getChildren(java.lang.Long node)
          Get children of the specified node
 java.util.List<java.lang.Long> getNodesWithoutChildren()
          Returns nodes without children
 java.util.List<java.lang.Long> getNodesWithoutParents()
          Returns nodes without parents
 java.util.List<java.lang.Long> getParents(java.lang.Long node)
          Get parents of the specified node
 int size()
          Returns number of nodes in the graph
 java.util.List<java.lang.Long> toposort()
          Get topologically sorted list of graph nodes (parents go before children)
 
Methods inherited from class jetbrains.buildServer.util.graph.BaseModificationDAG
breadthFirstSearch, breadthFirstSearch, filter, getCommonAncestors, getCommonAncestors, getDepthFirstSearch, getReverseDepthFirstSearch, reverseBreadthFirstSearch, toposortFrom
 
Methods inherited from class jetbrains.buildServer.util.graph.DAG
depthFirstSearch, ensureContainsNode, exclude, filter, filter, getCommonAncestors, include, include, isEmpty, iterator, iterator, iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyLinearDag

public EmptyLinearDag()
Method Detail

toposort

@NotNull
public java.util.List<java.lang.Long> toposort()
Description copied from class: DAG
Get topologically sorted list of graph nodes (parents go before children)

Specified by:
toposort in class DAG<java.lang.Long>
Returns:
see above

getParents

@NotNull
public java.util.List<java.lang.Long> getParents(@NotNull
                                                         java.lang.Long node)
Description copied from class: DAG
Get parents of the specified node

Specified by:
getParents in class DAG<java.lang.Long>
Parameters:
node - node of interest
Returns:
see above

getChildren

@NotNull
public java.util.List<java.lang.Long> getChildren(@NotNull
                                                          java.lang.Long node)
Description copied from class: DAG
Get children of the specified node

Specified by:
getChildren in class DAG<java.lang.Long>
Parameters:
node - node of interest
Returns:
see above

containsNode

public boolean containsNode(@NotNull
                            java.lang.Long node)
Description copied from class: DAG
Check if graph contains specified node

Specified by:
containsNode in class DAG<java.lang.Long>
Parameters:
node - node to check
Returns:
true if graph contains node, false otherwise

getNodesWithoutParents

@NotNull
public java.util.List<java.lang.Long> getNodesWithoutParents()
Description copied from class: DAG
Returns nodes without parents

Specified by:
getNodesWithoutParents in class DAG<java.lang.Long>
Returns:
see above

getNodesWithoutChildren

@NotNull
public java.util.List<java.lang.Long> getNodesWithoutChildren()
Description copied from class: DAG
Returns nodes without children

Specified by:
getNodesWithoutChildren in class DAG<java.lang.Long>
Returns:
see above

size

public int size()
Description copied from class: DAG
Returns number of nodes in the graph

Specified by:
size in class DAG<java.lang.Long>
Returns:
see above

getAllNodes

@NotNull
public java.util.Set<java.lang.Long> getAllNodes()
Specified by:
getAllNodes in class DAG<java.lang.Long>