Class BlockChunkFinder
java.lang.Object
org.jenkinsci.plugins.workflow.graphanalysis.BlockChunkFinder
- All Implemented Interfaces:
ChunkFinder
Matches start and end of a block. Any block!
- Author:
- Sam Van Oort
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isChunkEnd
(FlowNode current, FlowNode previous) Test if the current node is the end of a chunk (inclusive)boolean
isChunkStart
(FlowNode current, FlowNode previous) Test if the current node is the start of a new chunk (inclusive)boolean
NOTE: you will need to handle cases where you have aBlockStartNode
where theBlockEndNode
has not been generated yet! This means you need to keep nodes around even after hitting the EndNode
-
Constructor Details
-
BlockChunkFinder
public BlockChunkFinder()
-
-
Method Details
-
isStartInsideChunk
public boolean isStartInsideChunk()NOTE: you will need to handle cases where you have aBlockStartNode
where theBlockEndNode
has not been generated yet! This means you need to keep nodes around even after hitting the EndNode- Specified by:
isStartInsideChunk
in interfaceChunkFinder
-
isChunkStart
Description copied from interface:ChunkFinder
Test if the current node is the start of a new chunk (inclusive)- Specified by:
isChunkStart
in interfaceChunkFinder
- Parameters:
current
- Node to test for being a start, it will begin the chunk and be includedprevious
- Previous node, to use in testing chunk- Returns:
- True if current node is the beginning of chunk
-
isChunkEnd
Description copied from interface:ChunkFinder
Test if the current node is the end of a chunk (inclusive)- Specified by:
isChunkEnd
in interfaceChunkFinder
- Parameters:
current
- Node to test for being endFor a block, the
BlockEndNode
For a legacy stage or marker, this will be first node of new stage (previous is the marker)
previous
- Previous node, to use in testing chunk- Returns:
- True if current is the end of a chunk (inclusive)
-