Class Splus
- java.lang.Object
-
- com.insightful.splusserver.domain.Splus
-
- All Implemented Interfaces:
SplusObject
,java.io.Serializable
public class Splus extends java.lang.Object implements SplusObject, java.io.Serializable
Defines theSplus
object.- Author:
- TIBCO
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_SPXML_SIZE_DEFAULT
-
Constructor Summary
Constructors Constructor Description Splus()
Constructs anSplus
object.Splus(DisplayOptions displayOptions, Header header, SplusObject... value)
Constructs anSplus
object, specifying the display options, the header, and the value.Splus(DisplayOptions displayOptions, Header header, java.util.List<SplusObject> value)
Constructs anSplus
object, specifying the display options, the header, and values.Splus(SplusObject... value)
Constructs anSplus
object with defaultDisplayOptions
andHeader
objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean[]
getAsBooleanArray()
Retrieves the value of thisSplus
object as an array of bools (logical vectors).DataFrame
getAsDataFrame()
Retrieves the value of thisSplus
object as aDataFrame
.double[]
getAsDoubleArray()
Retrieves the value of thisSplus
object as an array of doubles.int[]
getAsIntArray()
Retrieves the value of thisSplus
object as an array ofints
.Matrix
getAsMatrix()
Retrieves value of thisSplus
object as aMatrix
.MultiDimensionalArray
getAsMultiDimensionalArray()
Retrieves the value of thisSplus
object as aMultiDimensionalArray
.java.lang.String
getAsString()
Helper method to get a first string of a vector returned.java.lang.String[]
getAsStringArray()
Retrieves the value of thisSplus
object as a string array.Vector
getAsVector()
Retrieves the value of thisSplus
object as aVector
.DisplayOptions
getDisplayOptions()
Retrieves the object's display options.<T extends SplusObject>
TgetFirstValue()
Retrieves the first value of the value array.Header
getHeader()
Retrieves the object's header.java.lang.String
getName()
This attribute does not exist in SPXML.java.util.List<SplusObject>
getValue()
Retrieves the generic object's value.void
setDisplayOptions(DisplayOptions displayOptions)
Sets the object's display options.void
setHeader(Header header)
Sets the object's header.void
setName(java.lang.String name)
Sets the name of this.void
setValue(java.util.List<SplusObject> value)
Sets theSplus
object's value.
-
-
-
Field Detail
-
MAX_SPXML_SIZE_DEFAULT
public static final int MAX_SPXML_SIZE_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Splus
public Splus()
Constructs anSplus
object.
-
Splus
public Splus(DisplayOptions displayOptions, Header header, SplusObject... value)
Constructs anSplus
object, specifying the display options, the header, and the value.- Parameters:
displayOptions
- ADisplayOptions
object.header
- AHeader
object.value
- TheSplusObject
value.- See Also:
DisplayOptions
,Header
,SplusObject
-
Splus
public Splus(SplusObject... value)
Constructs anSplus
object with defaultDisplayOptions
andHeader
objects.- Parameters:
value
-
-
Splus
public Splus(DisplayOptions displayOptions, Header header, java.util.List<SplusObject> value)
Constructs anSplus
object, specifying the display options, the header, and values.- Parameters:
displayOptions
- ADisplayOptions
object.header
- AHeader
object.value
- A list ofSplusObject
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
- ADisplayOptions
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
- AHeader
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 theSplus
object's value.- Parameters:
value
- AnSplusObject
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 thisSplus
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 thisSplus
object as an array ofints
. 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 thisSplus
object as aVector
. Assumes that this object contains aVector
as a first element.- Returns:
- The
Vector
. - See Also:
Vector
-
getAsMatrix
public Matrix getAsMatrix()
Retrieves value of thisSplus
object as aMatrix
. Assumes that this object contains aMatrix
as a first element.- Returns:
- The
Matrix
. - See Also:
Matrix
-
getAsMultiDimensionalArray
public MultiDimensionalArray getAsMultiDimensionalArray()
Retrieves the value of thisSplus
object as aMultiDimensionalArray
. Assumes that this object contains aMultiDimensionalArray
as a first element.- Returns:
- The
MultiDimensionalArray
- See Also:
MultiDimensionalArray
-
getAsDataFrame
public DataFrame getAsDataFrame()
Retrieves the value of thisSplus
object as aDataFrame
. Assumes that this object contains aDataFrame
as a first element.- Returns:
- The
DataFrame
- See Also:
DataFrame
-
getAsBooleanArray
public boolean[] getAsBooleanArray()
Retrieves the value of thisSplus
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 thisSplus
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 fromSplusObject
, such asVector
orMatrix
.- 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 theSplusObject
. The default value isSPLUS
.- Specified by:
getName
in interfaceSplusObject
- Returns:
- the name of this.
-
setName
public void setName(java.lang.String name)
Sets the name of this.- Specified by:
setName
in interfaceSplusObject
- Parameters:
name
- a String.
-
-