Class StepChain
- All Implemented Interfaces:
PipelineExpression
AST for a list of StepDeclaration
s that are chained together.
Steps that are chained together should have their output connected to the input of the following step in the chain.
Steps that are declared (but not chained to another) will be on the only step in the step chain. In this case it would be expected that the the same step be present in another step chain to be chained together with other steps.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStepChain
(List<StepDeclaration> steps) StepChain
(List<StepDeclaration> steps, List<Token> links) -
Method Summary
Modifier and TypeMethodDescriptionReturns a new StepChain with all the steps from the given chain appended to this chainappend
(StepDeclaration stepDeclaration) Returns a new StepChain with the given step appendedprotected void
appendSource
(StringBuilder appendTo) protected void
appendString
(StringBuilder appendTo) protected boolean
boolean
getFirst()
Nicer form of StepChain#getSteps().get(0)getLast()
Nicer form ofStepChain.getSteps().get(StepChain.getSteps().size() - 1);
getLink
(int index) int
getSteps()
int
hashCode()
int
size()
final String
toSource()
final String
toString()
Returns a simplified view of the ast in a source-like fashion, but with a lot of details left out for conciseness
-
Field Details
-
CHAIN_TOKEN
A handy constant for building AST in code (instead of parsing it)
-
EMPTY
-
-
Constructor Details
-
StepChain
-
StepChain
-
-
Method Details
-
getBoundary
-
append
Returns a new StepChain with all the steps from the given chain appended to this chain
-
append
Returns a new StepChain with the given step appended
-
appendSource
-
appendString
-
getFirst
Nicer form of StepChain#getSteps().get(0)
- Throws:
IndexOutOfBoundsException
- if this chain is empty
-
getLast
Nicer form of
StepChain.getSteps().get(StepChain.getSteps().size() - 1);
- Throws:
IndexOutOfBoundsException
- if this chain is empty
-
getLink
-
getLinkCount
public int getLinkCount() -
size
public int size()- Returns:
- the number of steps in this chain
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getSteps
-
toString
Returns a simplified view of the ast in a source-like fashion, but with a lot of details left out for conciseness
-
toSource
- Specified by:
toSource
in interfacePipelineExpression
- Returns:
- a string that can be parsed back in to the same ast as this one. It might not be whitespace-faithful...
-