org.scilab.modules.types
Interface ScilabType

All Superinterfaces:
java.lang.Cloneable, java.io.Externalizable, java.io.Serializable
All Known Implementing Classes:
ScilabBoolean, ScilabBooleanReference, ScilabBooleanSparse, ScilabDouble, ScilabDoubleReference, ScilabInteger, ScilabIntegerReference, ScilabList, ScilabMList, ScilabPolynomial, ScilabSparse, ScilabString, ScilabTList

public interface ScilabType
extends java.io.Externalizable, java.lang.Cloneable

This interface specifies what is a Scilab types

This class is Serializable and any modification could impact load and store of data (Xcos files, Javasci saved data, etc...).


Method Summary
 boolean equals(java.lang.Object obj)
          Compare if obj is the same object or not
 int getHeight()
          Return the height (number of elements) of the stored data
 java.lang.Object getSerializedObject()
          Get a single object used to easily rebuild a Scilab variable from the Java ScilabType
 ScilabTypeEnum getType()
          Return the type of Scilab
 java.lang.String getVarName()
          Get the variable name or null if it has not a name
 int getWidth()
          Return the width (number of elements) of the stored data
 boolean isEmpty()
          Check if the current instance is empty.
 boolean isReference()
           
 boolean isSwaped()
          Get the how the matrix is stored
 java.lang.String toString()
          Display the representation in the Scilab language of the type
Note that the representation can be copied/pasted straight into Scilab
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Method Detail

getType

ScilabTypeEnum getType()
Return the type of Scilab

Returns:
the type of Scilab
Since:
5.4.0

isReference

boolean isReference()
Returns:
true if data are backed in a java.nio.Buffer

getWidth

int getWidth()
Return the width (number of elements) of the stored data

Returns:
the width

getHeight

int getHeight()
Return the height (number of elements) of the stored data

Returns:
the height

isEmpty

boolean isEmpty()
Check if the current instance is empty.

Returns:
true, the there is no data; false otherwise.

getVarName

java.lang.String getVarName()
Get the variable name or null if it has not a name

Returns:
the name

isSwaped

boolean isSwaped()
Get the how the matrix is stored

Returns:
true if the matrix is stored row by row

equals

boolean equals(java.lang.Object obj)
Compare if obj is the same object or not

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object we want to compare
Returns:
true if the two objects are equals, false otherwise

getSerializedObject

java.lang.Object getSerializedObject()
Get a single object used to easily rebuild a Scilab variable from the Java ScilabType

Returns:
an very simple object reflecting this ScilabType.

toString

java.lang.String toString()
Display the representation in the Scilab language of the type
Note that the representation can be copied/pasted straight into Scilab

Overrides:
toString in class java.lang.Object
Returns:
the pretty print