Package org.jline.shell
Enum Pipeline.Operator
- java.lang.Object
-
- java.lang.Enum<Pipeline.Operator>
-
- org.jline.shell.Pipeline.Operator
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Pipeline.Operator>
- Enclosing interface:
- Pipeline
public static enum Pipeline.Operator extends java.lang.Enum<Pipeline.Operator>
Operators that connect commands in a pipeline.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANDLogical AND: execute next command only if previous succeeded (&&)APPENDAppend redirection: append output to file (>>)COMBINED_REDIRECTCombined redirection: redirect both stdout and stderr to file (&>)FLIPFlip pipe: appends output as argument to next command (|;)HEREDOCHere-document: provide stdin inline (<<)INPUT_REDIRECTInput redirection: read stdin from file (<)ORLogical OR: execute next command only if previous failed (||)PIPEStandard pipe: sends output of left command to right command (|)REDIRECTOutput redirection: write output to file (>)SEQUENCESequence: execute next command unconditionally (;)STDERR_REDIRECTStderr redirection: redirect stderr to file (2>)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Pipeline.OperatorfromSymbol(java.lang.String symbol)Returns the operator matching the given symbol, ornullif none matches.java.lang.Stringsymbol()Returns the string symbol for this operator.static Pipeline.OperatorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Pipeline.Operator[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PIPE
public static final Pipeline.Operator PIPE
Standard pipe: sends output of left command to right command (|)
-
FLIP
public static final Pipeline.Operator FLIP
Flip pipe: appends output as argument to next command (|;)
-
AND
public static final Pipeline.Operator AND
Logical AND: execute next command only if previous succeeded (&&)
-
OR
public static final Pipeline.Operator OR
Logical OR: execute next command only if previous failed (||)
-
REDIRECT
public static final Pipeline.Operator REDIRECT
Output redirection: write output to file (>)
-
APPEND
public static final Pipeline.Operator APPEND
Append redirection: append output to file (>>)
-
INPUT_REDIRECT
public static final Pipeline.Operator INPUT_REDIRECT
Input redirection: read stdin from file (<)
-
HEREDOC
public static final Pipeline.Operator HEREDOC
Here-document: provide stdin inline (<<)
-
STDERR_REDIRECT
public static final Pipeline.Operator STDERR_REDIRECT
Stderr redirection: redirect stderr to file (2>)
-
COMBINED_REDIRECT
public static final Pipeline.Operator COMBINED_REDIRECT
Combined redirection: redirect both stdout and stderr to file (&>)
-
SEQUENCE
public static final Pipeline.Operator SEQUENCE
Sequence: execute next command unconditionally (;)
-
-
Method Detail
-
values
public static Pipeline.Operator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Pipeline.Operator c : Pipeline.Operator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Pipeline.Operator valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
symbol
public java.lang.String symbol()
Returns the string symbol for this operator.- Returns:
- the operator symbol
-
fromSymbol
public static Pipeline.Operator fromSymbol(java.lang.String symbol)
Returns the operator matching the given symbol, ornullif none matches.- Parameters:
symbol- the symbol to look up- Returns:
- the matching operator, or null
-
-