mirror of
https://github.com/sjsdfg/effective-java-3rd-chinese.git
synced 2025-02-10 11:30:19 +08:00
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
-a Simple option
|
|
-b
|
|
Simple option on next line
|
|
--very-long-option Long option
|
|
+f Option using +
|
|
-f FILE Option with value 1
|
|
--file=FILE Option with value 2
|
|
-2, --two Two options in a row.
|
|
-f FILE, --file=FILE Two options with values in a row.
|
|
/V A VMS/DOS-style option.
|
|
|
|
----------------------------------------------------
|
|
|
|
[
|
|
["command-line-option", "-a"],
|
|
" Simple option\r\n",
|
|
["command-line-option", "-b"],
|
|
"\r\n Simple option on next line\r\n",
|
|
["command-line-option", "--very-long-option"],
|
|
" Long option\r\n",
|
|
["command-line-option", "+f"],
|
|
" Option using +\r\n",
|
|
["command-line-option", "-f FILE"],
|
|
" Option with value 1\r\n",
|
|
["command-line-option", "--file=FILE"],
|
|
" Option with value 2\r\n",
|
|
["command-line-option", "-2, --two"],
|
|
" Two options in a row.\r\n",
|
|
["command-line-option", "-f FILE, --file=FILE"],
|
|
" Two options with values in a row.\r\n",
|
|
["command-line-option", "/V"],
|
|
" A VMS/DOS-style option."
|
|
]
|
|
|
|
----------------------------------------------------
|
|
|
|
Checks for command line options. |