net.sf.tomp.xtcl.command
Class Str
java.lang.Object
net.sf.tomp.xtcl.command.AbstractCommand
net.sf.tomp.xtcl.command.VarCommand
net.sf.tomp.xtcl.command.Str
- All Implemented Interfaces:
- Command
public class Str
- extends VarCommand
Creates a String and puts it as variable to Context.
- Author:
- tomp
Field Summary |
protected java.lang.String |
value
the String content |
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand |
var |
Constructor Summary |
Str()
|
Method Summary |
int |
execute(Context context)
Creates a String and puts it as variable to Context. |
void |
setValue(java.lang.String v)
set the String content |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
value
protected java.lang.String value
- the String content
Str
public Str()
setValue
public void setValue(java.lang.String v)
- set the String content
- Parameters:
v
- the String content
execute
public int execute(Context context)
throws java.lang.Exception
- Creates a String and puts it as variable to Context.
- Specified by:
execute
in interface Command
- Overrides:
execute
in class AbstractCommand
- Parameters:
context
- Context this command will be executed in.
- Returns:
- always 0 == success, OK
- Throws:
java.lang.Exception
- only if I/O error occurs when reporting the result to user.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- "STRING " + var + "='" + value + "'";
Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.