Sindbad~EG File Manager

Current Path : /usr/home/beeson/public_html/dynamicgeometry/org/dynamicgeometry/diagrammer/
Upload File :
Current File : /usr/home/beeson/public_html/dynamicgeometry/org/dynamicgeometry/diagrammer/Command.java

package org.dynamicgeometry.diagrammer;
import org.dynamicgeometry.scripts.*;
// 12.18.06 Beeson added toString

public class Command
{
    private String label;
    private String commandName;
    private String[] arguments;

	/**
	 * Constructor
	 */
    public Command( String _label, String _commandName, String[] _arguments ) {
        label = _label;
        commandName = _commandName;
        arguments = _arguments;
    }

	/**
	 * Return label of the command
	 */
    public String getLabel() {
        return label;
    }

    /**
     * Set label
     */
	public void setLabel(String lbl) {
		label = new String(lbl);
	}

	/**
	 * Return name of command
	 */
    public String getCommandName() {
        return commandName;
    }

	/**
	 * Return arguments as an array of strings
	 */
    public String[] getArguments() {
        return arguments;
    }

    /**
    * express a command in string form
    */
    public String toString(){
    String ans;
    if(label != null)
       ans = label + '=';
    else
       ans = "";
    ans += commandName + "(" + arguments[0];
    int i;
    for(i=1;i<arguments.length;i++)
       ans += "," + arguments[i];
    ans += ");";
    return ans;
   }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists