public class Opts extends Object
Constructor and Description |
---|
Opts(List<String> args)
Create a new instance for the given command-line parameters.
|
Opts(String[] args)
Create a new instance for the given command-line parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
fail()
Send a fail.
|
boolean |
hasArgs() |
boolean |
hasOpt(String opt)
Check if the option flag is in the remaining parameters
|
boolean |
hasOpts() |
void |
info(String params,
String desc)
Write an info.
|
boolean |
isHelpMode() |
boolean |
nextArgIsHelp() |
boolean |
nextEq(Collection<String> eqs) |
boolean |
nextEq(String eq) |
File |
nextFile() |
List<String> |
nextList() |
String |
nextOpt() |
String |
peekArg() |
void |
setHelpMode(boolean helpMode) |
public Opts(String[] args)
args
- command-line parameter arraypublic void setHelpMode(boolean helpMode)
helpMode
- the helpMode to setpublic boolean isHelpMode()
public boolean hasArgs()
public boolean hasOpts()
public boolean hasOpt(String opt)
opt
- public boolean nextEq(String eq)
public boolean nextEq(Collection<String> eqs)
public String nextOpt()
public File nextFile()
public String peekArg()
public boolean nextArgIsHelp()
public void fail()
Copyright © 2010–2015. All rights reserved.