- java.lang.Object
-
- org.jline.shell.impl.DefaultPipeline
-
- All Implemented Interfaces:
Pipeline
public class DefaultPipeline extends java.lang.Object implements Pipeline
Default implementation ofPipeline.A pipeline is an ordered list of
Pipeline.Stages connected byPipeline.Operators. Instances are immutable and created viaPipeline.of(String)orPipelineParser.parse(String).- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultPipeline.DefaultStageDefault implementation ofPipeline.Stage.-
Nested classes/interfaces inherited from interface org.jline.shell.Pipeline
Pipeline.Operator, Pipeline.Stage
-
-
Constructor Summary
Constructors Constructor Description DefaultPipeline(java.util.List<Pipeline.Stage> stages, java.lang.String source, boolean background)Creates a new pipeline.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBackground()Returns whether this pipeline should execute in the background.java.lang.Stringsource()Returns the original command line string that was parsed to create this pipeline.java.util.List<Pipeline.Stage>stages()Returns the ordered list of stages in this pipeline.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultPipeline
public DefaultPipeline(java.util.List<Pipeline.Stage> stages, java.lang.String source, boolean background)
Creates a new pipeline.- Parameters:
stages- the ordered stagessource- the original command linebackground- whether to execute in background
-
-
Method Detail
-
stages
public java.util.List<Pipeline.Stage> stages()
Description copied from interface:PipelineReturns the ordered list of stages in this pipeline.
-
source
public java.lang.String source()
Description copied from interface:PipelineReturns the original command line string that was parsed to create this pipeline.
-
isBackground
public boolean isBackground()
Description copied from interface:PipelineReturns whether this pipeline should execute in the background.- Specified by:
isBackgroundin interfacePipeline- Returns:
- true if background execution was requested
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-