public enum InputMode extends Enum<InputMode>
Enum Constant and Description |
---|
CompleteInput
The command processes its input as a whole.
|
LineByLine
The command processes its input line by line.
|
NoInput
The command processes no input at all.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isCompleteInput()
Convenience method returning true if this constant equals
CompleteInput . |
boolean |
isLineByLine()
Convenience method returning true if this constant equals
LineByLine . |
boolean |
isNoInput()
Convenience method returning true if this constant equals
NoInput . |
static InputMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InputMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InputMode NoInput
Commands of this type are suitable starting points for command execution.
A static method is generated in Unix4j
if a command interface
method is annotated with this mode.
public static final InputMode LineByLine
The command can process the input line-by-line and write to the output when processing a single line, but it is a requirement that all available input lines have been read when returning from the command's execute method.
public static final InputMode CompleteInput
public static InputMode[] values()
for (InputMode c : InputMode.values()) System.out.println(c);
public static InputMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isNoInput()
NoInput
.this==NoInput
public boolean isLineByLine()
LineByLine
.this==LineByLine
public boolean isCompleteInput()
CompleteInput
.this==CompleteInput
Copyright © 2024. All rights reserved.