public final class WcOptionSets extends Object
wc
command with the
the following options:
-l | --lines | Executes a count of lines and writes this count to the output. | |||
-w | --words | Executes a count of words and writes this count to the output. A
word is a non-zero-length string of characters delimited by white
space as defined by Character.isWhitespace(char) . | |||
-m | --chars | Executes a count of chars and writes this count to the output. |
This class serves as entry point to every possible set of wc
options
defined as an enum constant. With this explicit expansion of all possible
option combinations, options can be passed to the command in a very compact
form, such as:
wc(Wc.Options.l, ...); wc(Wc.Options.l.w, ...); ... wc(Wc.Options.l.w.m, ...);
Modifier and Type | Field and Description |
---|---|
WcOptionSet_lmw |
chars
Option
"--chars" : Executes a count of chars and writes this count to the output. |
static WcOptionSets |
INSTANCE
The singleton instance.
|
WcOptionSet_lmw |
l
Option
"-l" : Executes a count of lines and writes this count to the output. |
WcOptionSet_lmw |
lines
Option
"--lines" : Executes a count of lines and writes this count to the output. |
WcOptionSet_lmw |
m
Option
"-m" : Executes a count of chars and writes this count to the output. |
WcOptionSet_lmw |
w
Option
"-w" : Executes a count of words and writes this count to the output. |
WcOptionSet_lmw |
words
Option
"--words" : Executes a count of words and writes this count to the output. |
Constructor and Description |
---|
WcOptionSets() |
public static final WcOptionSets INSTANCE
public final WcOptionSet_lmw m
"-m"
: Executes a count of chars and writes this count to the output.
The option "-m"
is equivalent to the "--
chars
"
option.
public final WcOptionSet_lmw chars
"--chars"
: Executes a count of chars and writes this count to the output.
The option "--chars"
is equivalent to the "-
m
"
option.
public final WcOptionSet_lmw l
"-l"
: Executes a count of lines and writes this count to the output.
The option "-l"
is equivalent to the "--
lines
"
option.
public final WcOptionSet_lmw lines
"--lines"
: Executes a count of lines and writes this count to the output.
The option "--lines"
is equivalent to the "-
l
"
option.
public final WcOptionSet_lmw w
"-w"
: Executes a count of words and writes this count to the output. A
word is a non-zero-length string of characters delimited by white
space as defined by Character.isWhitespace(char)
.
The option "-w"
is equivalent to the "--
words
"
option.
public final WcOptionSet_lmw words
"--words"
: Executes a count of words and writes this count to the output. A
word is a non-zero-length string of characters delimited by white
space as defined by Character.isWhitespace(char)
.
The option "--words"
is equivalent to the "-
w
"
option.
public WcOptionSets()
Copyright © 2024. All rights reserved.