Package jetbrains.buildServer.util.graph
Class EmptyLinearDag
- java.lang.Object
-
- jetbrains.buildServer.util.graph.DAG<Long>
-
- jetbrains.buildServer.util.graph.BaseModificationDAG
-
- jetbrains.buildServer.util.graph.LinearDag
-
- jetbrains.buildServer.util.graph.EmptyLinearDag
-
public class EmptyLinearDag extends LinearDag
- Author:
- dmitry.neverov
-
-
Constructor Summary
Constructors Constructor Description EmptyLinearDag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsNode(Long node)
Check if graph contains specified nodeprotected void
fillSelfChildren(Long node, List<Long> accumulator)
Set<Long>
getAllNodes()
List<Long>
getNodesWithoutChildren()
Returns nodes without childrenList<Long>
getNodesWithoutParents()
Returns nodes without parentsList<Long>
getParents(Long node)
Get parents of the specified nodeprotected List<Long>
getSelfParents(Long node)
int
size()
Returns number of nodes in the graphList<Long>
toposort()
Get topologically sorted list of graph nodes (parents go before children)-
Methods inherited from class jetbrains.buildServer.util.graph.LinearDag
getMaxNode, processNodesWithoutChildren
-
Methods inherited from class jetbrains.buildServer.util.graph.BaseModificationDAG
breadthFirstSearch, breadthFirstSearch, filter, getCommonAncestors, getDepthFirstSearch, getReverseDepthFirstSearch, iterator, iterator, iterator, reverseBreadthFirstSearch, reverseBreadthFirstSearch, tailSize, toposortFrom
-
Methods inherited from class jetbrains.buildServer.util.graph.DAG
depthFirstSearch, ensureContainsNode, exclude, filter, filter, getChildren, getCommonAncestors, getNodesWithMissingParents, hasParents, include, include, isEmpty, splitIsolatedDAGs
-
-
-
-
Method Detail
-
toposort
@NotNull public List<Long> toposort()
Description copied from class:DAG
Get topologically sorted list of graph nodes (parents go before children)
-
getParents
@NotNull public List<Long> getParents(@NotNull Long node)
Description copied from class:DAG
Get parents of the specified node- Specified by:
getParents
in classDAG<Long>
- Parameters:
node
- node of interest- Returns:
- see above
-
getSelfParents
@Nullable protected List<Long> getSelfParents(@NotNull Long node)
- Specified by:
getSelfParents
in classDAG<Long>
-
fillSelfChildren
protected void fillSelfChildren(@NotNull Long node, @NotNull List<Long> accumulator)
- Specified by:
fillSelfChildren
in classDAG<Long>
-
containsNode
public boolean containsNode(@NotNull Long node)
Description copied from class:DAG
Check if graph contains specified node- Specified by:
containsNode
in classDAG<Long>
- Parameters:
node
- node to check- Returns:
- true if graph contains node, false otherwise
-
getNodesWithoutParents
@NotNull public List<Long> getNodesWithoutParents()
Description copied from class:DAG
Returns nodes without parents- Specified by:
getNodesWithoutParents
in classDAG<Long>
- Returns:
- see above
-
getNodesWithoutChildren
@NotNull public List<Long> getNodesWithoutChildren()
Description copied from class:DAG
Returns nodes without children- Overrides:
getNodesWithoutChildren
in classBaseModificationDAG
- Returns:
- see above
-
size
public int size()
Description copied from class:DAG
Returns number of nodes in the graph
-
getAllNodes
@NotNull public Set<Long> getAllNodes()
- Specified by:
getAllNodes
in classDAG<Long>
-
-