org.pz.platypus.commandTypes
Class CommandS
java.lang.Object
org.pz.platypus.Command
org.pz.platypus.commandTypes.CommandS
- All Implemented Interfaces:
- ICommand
public class CommandS
- extends Command
Command with a single String parameter
- Author:
- alb
Constructor Summary |
CommandS(java.lang.String commandRoot,
char allowInCode)
|
Method Summary |
ParamType |
getParamType()
what kind of argument, if any, does the command take? |
java.lang.String |
getRoot()
get the root of the command. |
java.lang.String |
getRootSubstitute()
get a substitute string for the root. |
int |
process(GDD gdd,
ParseContext context,
TokenList tl,
boolean inCode)
Processes the command and returns the number of chars in the command + parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandS
public CommandS(java.lang.String commandRoot,
char allowInCode)
process
public int process(GDD gdd,
ParseContext context,
TokenList tl,
boolean inCode)
- Processes the command and returns the number of chars in the command + parameters.
- Parameters:
gdd
- GDDtl
- TokenList to which the generated tokens are addedinCode
- Are we currently in a code section?context
- the parsing context
- Returns:
- number of chars to skip to get past the command string in the input. If negative,
means an error occurred.
getParamType
public ParamType getParamType()
- Description copied from class:
Command
- what kind of argument, if any, does the command take?
- Specified by:
getParamType
in interface ICommand
- Overrides:
getParamType
in class Command
- Returns:
- ParamType for the command
getRoot
public java.lang.String getRoot()
- Description copied from class:
Command
- get the root of the command. For example, [fsize: in [fsize:12pt]
- Specified by:
getRoot
in interface ICommand
- Overrides:
getRoot
in class Command
- Returns:
- the root as a string
getRootSubstitute
public java.lang.String getRootSubstitute()
- Description copied from class:
Command
- get a substitute string for the root. This is null except in cases where
the command is shorthand for a longer command string.
- Specified by:
getRootSubstitute
in interface ICommand
- Overrides:
getRootSubstitute
in class Command
- Returns:
- the actual command string for which the current command is shorthand
Copyright © 2008-10 Pacific Data Works LLC