Class Splus

  • All Implemented Interfaces:
    SplusObject, java.io.Serializable

    public class Splus
    extends java.lang.Object
    implements SplusObject, java.io.Serializable
    Defines the Splus object.
    Author:
    TIBCO
    See Also:
    Serialized Form
    • Field Detail

    • Constructor Detail

      • Splus

        public Splus()
        Constructs an Splus object.
      • Splus

        public Splus​(DisplayOptions displayOptions,
                     Header header,
                     SplusObject... value)
        Constructs an Splus object, specifying the display options, the header, and the value.
        Parameters:
        displayOptions - A DisplayOptions object.
        header - A Header object.
        value - The SplusObject value.
        See Also:
        DisplayOptions, Header, SplusObject
      • Splus

        public Splus​(SplusObject... value)
        Constructs an Splus object with default DisplayOptions and Header objects.
        Parameters:
        value -
      • Splus

        public Splus​(DisplayOptions displayOptions,
                     Header header,
                     java.util.List<SplusObject> value)
        Constructs an Splus object, specifying the display options, the header, and values.
        Parameters:
        displayOptions - A DisplayOptions object.
        header - A Header object.
        value - A list of SplusObject values.
        See Also:
        DisplayOptions, Header, SplusObject
    • Method Detail

      • getDisplayOptions

        public DisplayOptions getDisplayOptions()
        Retrieves the object's display options.
        Returns:
        A DisplayOptions object.
        See Also:
        DisplayOptions
      • setDisplayOptions

        public void setDisplayOptions​(DisplayOptions displayOptions)
        Sets the object's display options.
        Parameters:
        displayOptions - A DisplayOptions object.
        See Also:
        DisplayOptions
      • getHeader

        public Header getHeader()
        Retrieves the object's header.
        Returns:
        A Header object.
        See Also:
        Header
      • setHeader

        public void setHeader​(Header header)
        Sets the object's header.
        Parameters:
        header - A Header object.
        See Also:
        Header
      • getValue

        public java.util.List<SplusObject> getValue()
        Retrieves the generic object's value.
        Returns:
        An SplusObject specifying the value.
      • setValue

        public void setValue​(java.util.List<SplusObject> value)
        Sets the Splus object's value.
        Parameters:
        value - An SplusObject specifying the value.
      • getAsString

        public java.lang.String getAsString()
        Helper method to get a first string of a vector returned.
        Returns:
        first element of the contained vector object as string
      • getAsStringArray

        public java.lang.String[] getAsStringArray()
        Retrieves the value of this Splus object as a string array. Assumes that this object contains a character vector as a first element.
        Returns:
        The string array.
      • getAsIntArray

        public int[] getAsIntArray()
        Retrieves the value of this Splus object as an array of ints. Assumes that this object contains an integer vector as a first element.
        Returns:
        The array of ints.
      • getAsVector

        public Vector getAsVector()
        Retrieves the value of this Splus object as a Vector. Assumes that this object contains a Vector as a first element.
        Returns:
        The Vector.
        See Also:
        Vector
      • getAsMatrix

        public Matrix getAsMatrix()
        Retrieves value of this Splus object as a Matrix. Assumes that this object contains a Matrix as a first element.
        Returns:
        The Matrix.
        See Also:
        Matrix
      • getAsMultiDimensionalArray

        public MultiDimensionalArray getAsMultiDimensionalArray()
        Retrieves the value of this Splus object as a MultiDimensionalArray. Assumes that this object contains a MultiDimensionalArray as a first element.
        Returns:
        The MultiDimensionalArray
        See Also:
        MultiDimensionalArray
      • getAsDataFrame

        public DataFrame getAsDataFrame()
        Retrieves the value of this Splus object as a DataFrame. Assumes that this object contains a DataFrame as a first element.
        Returns:
        The DataFrame
        See Also:
        DataFrame
      • getAsBooleanArray

        public boolean[] getAsBooleanArray()
        Retrieves the value of this Splus object as an array of bools (logical vectors). Assumes that this object contains an logical vector as a first element.
        Returns:
        The logical vector.
      • getAsDoubleArray

        public double[] getAsDoubleArray()
        Retrieves the value of this Splus object as an array of doubles. Assumes that this object contains an numeric vector as a first element.
        Returns:
        An array of doubles.
      • getFirstValue

        public <T extends SplusObject> T getFirstValue()
        Retrieves the first value of the value array.
        Type Parameters:
        T - Any class derived from SplusObject, such as Vector or Matrix.
        Returns:
        The first value in the value list.
      • getName

        public java.lang.String getName()
        This attribute does not exist in SPXML. It is needed so that it can implement the SplusObject. The default value is SPLUS.
        Specified by:
        getName in interface SplusObject
        Returns:
        the name of this.
      • setName

        public void setName​(java.lang.String name)
        Sets the name of this.
        Specified by:
        setName in interface SplusObject
        Parameters:
        name - a String.