|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.SoftWoehr.JTOpenContrib.MEU.MEUCommand
Embodies command parsing from the command line at the top of the MEU editor.
Constructor Summary | |
MEUCommand(java.lang.String s)
Parse a string to create a new MEUCommand |
Method Summary | |
java.lang.String |
getArgString()
Get the arg string without the command |
boolean |
getBeforeNotAfter()
If processMoveCopySpecs() is called successfully, if true, move before, otherwise, after. |
java.lang.String |
getChangeBufferRange()
Return the "*" or number spec for number of changes in buffer instanced by successful processChangeSpecs(). |
java.lang.String |
getChangeLineRange()
Return the "*" or number spec for number of changes in line instanced by successful processChangeSpecs(). |
java.lang.String |
getChangeMod()
Return the change mod (the changed string) from a change specification instanced by successful processChangeSpecs(). |
java.lang.String |
getChangeTarget()
Return the change target from a change specification instanced by successful processChangeSpecs(). |
java.lang.String |
getCommand()
Get the command |
java.lang.String |
getCommandString()
Get the original command string |
static int |
getConvertedChangeRange(java.lang.String changeRange)
Returns int number of changes or -1 for "*". |
int |
getMoveCopyNumber()
If processMoveCopySpecs() is called successfully, the number of lines to copy/move |
int |
getMoveCopyStart()
If processMoveCopySpecs() is called successfully, the first line to copy/move |
int |
getMoveCopyTarget()
If processMoveCopySpecs() is called successfully, the line move/copy before/after. |
static void |
main(java.lang.String[] argv)
Show and test use of MEUCommand |
java.lang.String |
nthArg(int n)
Get the nth argument |
int |
numArgs()
Get the number of args to the command |
boolean |
processChangeSpecs()
Used by a CHANGE command to process the change specification. |
boolean |
processMoveCopySpecs()
Used by a MOVE or COPY command to process the specification. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MEUCommand(java.lang.String s)
s
- The command as entered by user.Method Detail |
public java.lang.String getCommandString()
public java.lang.String getCommand()
public int numArgs()
public java.lang.String nthArg(int n)
n
- Zero-based index of argument (not including command itself).public java.lang.String getArgString()
public boolean processChangeSpecs()
public java.lang.String getChangeTarget()
public java.lang.String getChangeMod()
public java.lang.String getChangeLineRange()
public static int getConvertedChangeRange(java.lang.String changeRange) throws java.lang.NumberFormatException
changeRange
- String value for this parameter as entered by user.java.lang.NumberFormatException
- changRange was neither "*" nor a base10 int.public java.lang.String getChangeBufferRange()
public boolean processMoveCopySpecs() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If some numeric value in the specs is not a base10 int.public int getMoveCopyStart()
public int getMoveCopyNumber()
public int getMoveCopyTarget()
public boolean getBeforeNotAfter()
public static void main(java.lang.String[] argv)
argv
- Command line for MEU.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |