com.hcarralero.toljava
Class TOLRSet

java.lang.Object
  extended by com.hcarralero.toljava.TOLRObject
      extended by com.hcarralero.toljava.TOLRSet
All Implemented Interfaces:
TOLObject

public class TOLRSet
extends TOLRObject

Representa a un objeto TOL de tipo Set


Field Summary
 
Fields inherited from class com.hcarralero.toljava.TOLRObject
tm, varname
 
Constructor Summary
TOLRSet(TOLMachine tm, java.lang.String varname)
          Construye un objeto de tipo TOLRSet
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compara a este objeto con otro
 TOLObject getElement(int index)
          Obtiene el elemento ubicado en la posición dada
 TOLObject[] getElements()
          Obtiene un arreglo con todos los elementos del Set
 int getSize()
          Obtiene el tamaño del Set
 int hashCode()
          Calcula el código hash asignado al objeto
 boolean isSet()
          Determina si el objeto corresponde al tipo Set de TOL
 java.lang.String toString()
          Obtiene una representación como cadena de texto del Set en la que incluye el nombre
 
Methods inherited from class com.hcarralero.toljava.TOLRObject
getTm, getVarname, isCode, isComplex, isDate, isMatrix, isPolyn, isRatio, isReal, isReference, isSerie, isText, isTimeSet, isVMatrix, setTm, setVarname
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TOLRSet

public TOLRSet(TOLMachine tm,
               java.lang.String varname)
Construye un objeto de tipo TOLRSet

Parameters:
tm - el objeto TOLMachine al que está ligado
varname - nombre de la variable en TOL
Method Detail

isSet

public boolean isSet()
Determina si el objeto corresponde al tipo Set de TOL

Specified by:
isSet in interface TOLObject
Overrides:
isSet in class TOLRObject
Returns:
true ya que el objeto corresponde al tipo Set de TOL

getSize

public int getSize()
            throws TOLMachineException
Obtiene el tamaño del Set

Returns:
el tamaño del Set
Throws:
TOLMachineException - cuando hay algún error en el acceso a TOL

getElement

public TOLObject getElement(int index)
                     throws TOLMachineException
Obtiene el elemento ubicado en la posición dada

Parameters:
index - Posición del elemento
Returns:
el elemento ubicado en la posición dada
Throws:
TOLMachineException - cuando hay algún error en el acceso a TOL

getElements

public TOLObject[] getElements()
                        throws TOLMachineException
Obtiene un arreglo con todos los elementos del Set

Returns:
un arreglo con todos los elementos del Set
Throws:
TOLMachineException - cuando hay algún error en el acceso a TOL

equals

public boolean equals(java.lang.Object obj)
Compara a este objeto con otro

Overrides:
equals in class java.lang.Object
Parameters:
obj - el objeto con el que se comparará
Returns:
true si el objeto pasado como parámetro es de tipo TOLRSet y contiene un conjunto idéntica

hashCode

public int hashCode()
Calcula el código hash asignado al objeto

Overrides:
hashCode in class java.lang.Object
Returns:
el código hash asignado al objeto

toString

public java.lang.String toString()
Obtiene una representación como cadena de texto del Set en la que incluye el nombre

Overrides:
toString in class java.lang.Object
Returns:
la representación como cadena de texto del Set en la que incluye el nombre