S-PLUS Connect/Java v1.0

com.insightful.controls
Class SplusFunctionInfo

java.lang.Object
  extended bycom.insightful.controls.SplusFunctionInfo

public class SplusFunctionInfo
extends Object

Holds information on which controls contain values to use in a function call, and how to format the values. Each control must implement SplusControlMethods, and provide a getValue() method which returns a String representing the value of the control.


Constructor Summary
SplusFunctionInfo()
          Construct an empty SplusFunctionInfo object.
SplusFunctionInfo(String aName)
          Construct an SplusFunctionInfo object specifying the name of the S-PLUS function to call.
 
Method Summary
 void add(SplusControlMethods aControl)
          Add a control to the control list with no name.
 void add(SplusControlMethods aControl, String aName)
          Add a control to the control list
 void add(SplusControlMethods aControl, String aName, boolean isQuoted)
          Add a control to the control list
 void add(SplusControlMethods aControl, String aName, boolean isQuoted, boolean isListed)
          Add a control to the control list
 void add(SplusControlMethods aControl, String aName, boolean isQuoted, boolean isListed, String omitValue)
          Add a control to the control list
 String getFunctionCall()
          Creates a string representing the S-PLUS function call based on the values in the registered controls.
 String getFunctionName()
          Get the name of the S-PLUS function to call.
 SplusControlMethods getResultControl()
          Get the control which will specify the name to which the results of the function should be assigned in S-PLUS.
 void setFunctionName(String aName)
          Set the name of the S-PLUS function to call.
 void setResultControl(SplusControlMethods control)
          Set the control which will specify the name to which the results of the function should be assigned in S-PLUS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplusFunctionInfo

public SplusFunctionInfo()
Construct an empty SplusFunctionInfo object.


SplusFunctionInfo

public SplusFunctionInfo(String aName)
Construct an SplusFunctionInfo object specifying the name of the S-PLUS function to call.

Method Detail

setFunctionName

public void setFunctionName(String aName)
Set the name of the S-PLUS function to call.


getFunctionName

public String getFunctionName()
Get the name of the S-PLUS function to call.


setResultControl

public void setResultControl(SplusControlMethods control)
Set the control which will specify the name to which the results of the function should be assigned in S-PLUS.


getResultControl

public SplusControlMethods getResultControl()
Get the control which will specify the name to which the results of the function should be assigned in S-PLUS.


add

public void add(SplusControlMethods aControl)
Add a control to the control list with no name. This will keep track of the control, but will not use it when writing the command for S-PLUS.

Parameters:
aControl - Control to add.

add

public void add(SplusControlMethods aControl,
                String aName)
Add a control to the control list

Parameters:
aControl - Control to add.
aName - Name of the function argument related to this control.

add

public void add(SplusControlMethods aControl,
                String aName,
                boolean isQuoted)
Add a control to the control list

Parameters:
aControl - Control to add.
aName - Name of the function argument related to this control.
isQuoted - Indicate whether the value should be wrapped in quotes.

add

public void add(SplusControlMethods aControl,
                String aName,
                boolean isQuoted,
                boolean isListed)
Add a control to the control list

Parameters:
aControl - Control to add.
aName - Name of the function argument related to this control.
isQuoted - Indicate whether the value should be wrapped in quotes.
isListed - Indicate whether the value should be wrapped in "list()".

add

public void add(SplusControlMethods aControl,
                String aName,
                boolean isQuoted,
                boolean isListed,
                String omitValue)
Add a control to the control list

Parameters:
aControl - Control to add.
aName - Name of the function argument related to this control.
isQuoted - Indicate whether the value should be wrapped in quotes.
isListed - Indicate whether the value should be wrapped in "list()".
omitValue - If the control has this value, it will be excluded.

getFunctionCall

public String getFunctionCall()
Creates a string representing the S-PLUS function call based on the values in the registered controls.

Returns:
String to be evaluated by the S-PLUS engine.

S-PLUS Connect/Java v1.0

Copyright © 2000, 2002 Insightful Corporation
Warning: Classes not documented in the S-PLUS Programmer's Guide may change in future releases.