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 booleancontainsNode(Long node)Check if graph contains specified nodeprotected voidfillSelfChildren(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)intsize()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:DAGGet topologically sorted list of graph nodes (parents go before children)
-
getParents
@NotNull public List<Long> getParents(@NotNull Long node)
Description copied from class:DAGGet parents of the specified node- Specified by:
getParentsin classDAG<Long>- Parameters:
node- node of interest- Returns:
- see above
-
getSelfParents
@Nullable protected List<Long> getSelfParents(@NotNull Long node)
- Specified by:
getSelfParentsin classDAG<Long>
-
fillSelfChildren
protected void fillSelfChildren(@NotNull Long node, @NotNull List<Long> accumulator)- Specified by:
fillSelfChildrenin classDAG<Long>
-
containsNode
public boolean containsNode(@NotNull Long node)Description copied from class:DAGCheck if graph contains specified node- Specified by:
containsNodein 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:DAGReturns nodes without parents- Specified by:
getNodesWithoutParentsin classDAG<Long>- Returns:
- see above
-
getNodesWithoutChildren
@NotNull public List<Long> getNodesWithoutChildren()
Description copied from class:DAGReturns nodes without children- Overrides:
getNodesWithoutChildrenin classBaseModificationDAG- Returns:
- see above
-
size
public int size()
Description copied from class:DAGReturns number of nodes in the graph
-
getAllNodes
@NotNull public Set<Long> getAllNodes()
- Specified by:
getAllNodesin classDAG<Long>
-
-