net.sf.tomp.xtcl.command
Class Str

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.VarCommand
          extended by 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 net.sf.tomp.xtcl.command.VarCommand
setVar
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected java.lang.String value
the String content

Constructor Detail

Str

public Str()
Method Detail

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.