|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ncl.cs.instantsoap.commandlineprocessor.commandFormat.CommandFormat
public class CommandFormat
Formatting control for converting command-line options into strings.
Command-line switches can come in short and long forms, and may have different prefixes for these. By convention or preference, the short or long prefix may be preferred. The choice for these paramers varies both by platform and by application.
Constructor Summary | |
---|---|
CommandFormat()
Make a new instance with all properties set to null. |
|
CommandFormat(String shortPrefix,
String longPrefix,
boolean mergeOptionsIfEmpty,
boolean preferShortPrefix)
Make a new instance with the properties set to the supplied values. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getLongPrefix()
Get the long prefix string. |
String |
getShortPrefix()
Get the sort prefx string. |
int |
hashCode()
|
boolean |
isMergeOptionsIfEmpty()
Find out if empty options should be merged. |
boolean |
isPreferShortPrefix()
Find out if short prefixes are preferred over long ones. |
void |
setLongPrefix(String longPrefix)
Set the long prefix string. |
void |
setMergeOptionsIfEmpty(boolean mergeOptionsIfEmpty)
Specify if empty options should be merged. |
void |
setPreferShortPrefix(boolean preferShortPrefix)
Specify if short prefixes should be preferred over long ones. |
void |
setShortPrefix(String shortPrefix)
Set the short prefix string. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CommandFormat()
public CommandFormat(String shortPrefix, String longPrefix, boolean mergeOptionsIfEmpty, boolean preferShortPrefix)
shortPrefix
- the prefix for short switches (typically - or /)longPrefix
- the prefix for long switches (typically -- or /)mergeOptionsIfEmpty
- true if options with no arguments can be merged as in
-t -x -f becomming -txfpreferShortPrefix
- true if short options are preferred over long onesMethod Detail |
---|
public String getShortPrefix()
public void setShortPrefix(String shortPrefix)
shortPrefix
- the new short prefixpublic String getLongPrefix()
public void setLongPrefix(String longPrefix)
longPrefix
- the new long prefixpublic boolean isMergeOptionsIfEmpty()
public void setMergeOptionsIfEmpty(boolean mergeOptionsIfEmpty)
mergeOptionsIfEmpty
- the new value for the mergeOptionsIfEmpty flagpublic boolean isPreferShortPrefix()
public void setPreferShortPrefix(boolean preferShortPrefix)
mergeOptionsIfEmpty
- the new value for the mergeOptionsIfEmpty flagpublic boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |