- java.lang.Object
-
- java.lang.Enum<Attributes.ControlFlag>
-
- org.jline.terminal.Attributes.ControlFlag
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Attributes.ControlFlag>
- Enclosing class:
- Attributes
public static enum Attributes.ControlFlag extends java.lang.Enum<Attributes.ControlFlag>
Control flags that manage hardware aspects of the terminal.Control flags determine how the terminal hardware operates. These flags control aspects such as baud rate, character size, parity, and hardware flow control.
Common control flags include:
CS5,CS6,CS7,CS8- Character size (5-8 bits)CSTOPB- Use two stop bits instead of onePARENB- Enable parity generation and detectionPARODD- Use odd parity instead of evenCLOCAL- Ignore modem control lines
Control flags can be accessed and modified using methods like
Attributes.getControlFlag(ControlFlag),Attributes.setControlFlag(ControlFlag, boolean), andAttributes.setControlFlags(EnumSet).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CCAR_OFLOWDCD flow control of outputCCTS_OFLOWCTS flow control of outputCDSR_OFLOWDSR flow control of outputCDTR_IFLOWDTR flow control of inputCIGNOREIgnore control flagsCLOCALIgnore modem status linesCREADEnable receiverCRTS_IFLOWRTS flow control of inputCS55 bits per characterCS66 bits per characterCS77 bits per characterCS88 bits per characterCSTOPBSend 2 stop bitsHUPCLHang up on last closePARENBParity enablePARODDOdd parity, else even
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Attributes.ControlFlagvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Attributes.ControlFlag[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CIGNORE
public static final Attributes.ControlFlag CIGNORE
Ignore control flags
-
CS5
public static final Attributes.ControlFlag CS5
5 bits per character
-
CS6
public static final Attributes.ControlFlag CS6
6 bits per character
-
CS7
public static final Attributes.ControlFlag CS7
7 bits per character
-
CS8
public static final Attributes.ControlFlag CS8
8 bits per character
-
CSTOPB
public static final Attributes.ControlFlag CSTOPB
Send 2 stop bits
-
CREAD
public static final Attributes.ControlFlag CREAD
Enable receiver
-
PARENB
public static final Attributes.ControlFlag PARENB
Parity enable
-
PARODD
public static final Attributes.ControlFlag PARODD
Odd parity, else even
-
HUPCL
public static final Attributes.ControlFlag HUPCL
Hang up on last close
-
CLOCAL
public static final Attributes.ControlFlag CLOCAL
Ignore modem status lines
-
CCTS_OFLOW
public static final Attributes.ControlFlag CCTS_OFLOW
CTS flow control of output
-
CRTS_IFLOW
public static final Attributes.ControlFlag CRTS_IFLOW
RTS flow control of input
-
CDTR_IFLOW
public static final Attributes.ControlFlag CDTR_IFLOW
DTR flow control of input
-
CDSR_OFLOW
public static final Attributes.ControlFlag CDSR_OFLOW
DSR flow control of output
-
CCAR_OFLOW
public static final Attributes.ControlFlag CCAR_OFLOW
DCD flow control of output
-
-
Method Detail
-
values
public static Attributes.ControlFlag[] 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 (Attributes.ControlFlag c : Attributes.ControlFlag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Attributes.ControlFlag 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
-
-