| [9887b93] | 1 | |
|---|
| 2 | package com.hcarralero.toljava; |
|---|
| 3 | |
|---|
| 4 | /** |
|---|
| 5 | * <p>Representa un objeto definido en un entorno de TOL, la máquina de TOL es quien |
|---|
| 6 | * maneja al objeto, en cuanto a su creación, generación de valores y eliminación. |
|---|
| 7 | * El objeto en TOLJava sólo es una referencia a un objeto definido en TOL.</p> |
|---|
| 8 | * |
|---|
| 9 | * <p>Subclases de <code>TOLRObject</code> deben tener correspondencia con tipos de datos |
|---|
| 10 | * de TOL, tales como TimeSet, Set y Serie.</p> |
|---|
| 11 | * |
|---|
| 12 | * @author Humberto Andrés Carralero López (hcarralero@gmail.com) |
|---|
| 13 | * @version 1.0 |
|---|
| 14 | */ |
|---|
| 15 | public abstract class TOLRObject implements TOLObject { |
|---|
| 16 | |
|---|
| 17 | protected TOLMachine tm; |
|---|
| 18 | |
|---|
| 19 | /** |
|---|
| 20 | * Obtiene el objeto TOLMachine al que está ligado esta referencia |
|---|
| 21 | * |
|---|
| 22 | * @return el objeto TOLMachine al que está ligado esta referencia |
|---|
| 23 | */ |
|---|
| 24 | public TOLMachine getTm() { |
|---|
| 25 | return tm; |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | /** |
|---|
| 29 | * Establece el objeto <code>TOLMachine</code> al que está ligado esta referencia |
|---|
| 30 | * |
|---|
| 31 | * @param tm nuevo objeto <code>TOLMachine</code> |
|---|
| 32 | */ |
|---|
| 33 | public void setTm(TOLMachine tm) { |
|---|
| 34 | this.tm = tm; |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | protected String varname; |
|---|
| 38 | |
|---|
| 39 | /** |
|---|
| 40 | * Obtiene el nombre de la variable del objeto en TOL |
|---|
| 41 | * |
|---|
| 42 | * @return el nombre de la variable del objeto en TOL |
|---|
| 43 | */ |
|---|
| 44 | public String getVarname() { |
|---|
| 45 | return varname; |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | /** |
|---|
| 49 | * Establece el nombre de la variable del objeto en TOL |
|---|
| 50 | * |
|---|
| 51 | * @param varname nuevo nombre de la variable |
|---|
| 52 | */ |
|---|
| 53 | public void setVarname(String varname) { |
|---|
| 54 | this.varname = varname; |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | /** |
|---|
| 58 | * Construye un objeto de tipo <code>TOLRObject</code> |
|---|
| 59 | * |
|---|
| 60 | * @param tm el objeto <code>TOLMachine</code> al que está ligado |
|---|
| 61 | * @param varname el nombre de la variable en TOL |
|---|
| 62 | */ |
|---|
| 63 | public TOLRObject(TOLMachine tm, String varname) { |
|---|
| 64 | this.tm = tm; |
|---|
| 65 | this.varname = varname; |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Determina si el objeto corresponde al tipo Text de TOL |
|---|
| 70 | * |
|---|
| 71 | * @return <code>true</code> ya que el objeto corresponde al tipo Text de TOL |
|---|
| 72 | */ |
|---|
| 73 | @Override |
|---|
| 74 | public boolean isText() { |
|---|
| 75 | return false; |
|---|
| 76 | } |
|---|
| 77 | |
|---|
| 78 | /** |
|---|
| 79 | * Determina si el objeto corresponde al tipo Real de TOL |
|---|
| 80 | * |
|---|
| 81 | * @return <code>false</code> ya que el objeto no corresponde al tipo Real de TOL |
|---|
| 82 | */ |
|---|
| 83 | @Override |
|---|
| 84 | public boolean isReal() { |
|---|
| 85 | return false; |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | /** |
|---|
| 89 | * Determina si el objeto corresponde al tipo Date de TOL |
|---|
| 90 | * |
|---|
| 91 | * @return <code>false</code> ya que el objeto no corresponde al tipo Date de TOL |
|---|
| 92 | */ |
|---|
| 93 | @Override |
|---|
| 94 | public boolean isDate() { |
|---|
| 95 | return false; |
|---|
| 96 | } |
|---|
| 97 | |
|---|
| 98 | /** |
|---|
| 99 | * Determina si el objeto corresponde al tipo Complex de TOL |
|---|
| 100 | * |
|---|
| 101 | * @return <code>false</code> ya que el objeto no corresponde al tipo Complex de TOL |
|---|
| 102 | */ |
|---|
| 103 | @Override |
|---|
| 104 | public boolean isComplex() { |
|---|
| 105 | return false; |
|---|
| 106 | } |
|---|
| 107 | |
|---|
| 108 | /** |
|---|
| 109 | * Determina si el objeto corresponde al tipo Matrix de TOL |
|---|
| 110 | * |
|---|
| 111 | * @return <code>false</code> ya que el objeto no corresponde al tipo Matrix de TOL |
|---|
| 112 | */ |
|---|
| 113 | @Override |
|---|
| 114 | public boolean isMatrix() { |
|---|
| 115 | return false; |
|---|
| 116 | } |
|---|
| 117 | |
|---|
| 118 | /** |
|---|
| 119 | * Determina si el objeto corresponde al tipo VMatrix de TOL |
|---|
| 120 | * |
|---|
| 121 | * @return <code>false</code> ya que el objeto no corresponde al tipo VMatrix de TOL |
|---|
| 122 | */ |
|---|
| 123 | @Override |
|---|
| 124 | public boolean isVMatrix() { |
|---|
| 125 | return false; |
|---|
| 126 | } |
|---|
| 127 | |
|---|
| 128 | /** |
|---|
| 129 | * Determina si el objeto corresponde al tipo Polyn de TOL |
|---|
| 130 | * |
|---|
| 131 | * @return <code>false</code> ya que el objeto no corresponde al tipo Polyn de TOL |
|---|
| 132 | */ |
|---|
| 133 | @Override |
|---|
| 134 | public boolean isPolyn() { |
|---|
| 135 | return false; |
|---|
| 136 | } |
|---|
| 137 | |
|---|
| 138 | /** |
|---|
| 139 | * Determina si el objeto corresponde al tipo Ratio de TOL |
|---|
| 140 | * |
|---|
| 141 | * @return <code>false</code> ya que el objeto no corresponde al tipo Ratio de TOL |
|---|
| 142 | */ |
|---|
| 143 | @Override |
|---|
| 144 | public boolean isRatio() { |
|---|
| 145 | return false; |
|---|
| 146 | } |
|---|
| 147 | |
|---|
| 148 | /** |
|---|
| 149 | * Determina si el objeto corresponde al tipo Serie de TOL |
|---|
| 150 | * |
|---|
| 151 | * @return <code>false</code> ya que el objeto no corresponde al tipo Serie de TOL |
|---|
| 152 | */ |
|---|
| 153 | @Override |
|---|
| 154 | public boolean isSerie() { |
|---|
| 155 | return false; |
|---|
| 156 | } |
|---|
| 157 | |
|---|
| 158 | /** |
|---|
| 159 | * Determina si el objeto corresponde al tipo TimeSet de TOL |
|---|
| 160 | * |
|---|
| 161 | * @return <code>false</code> ya que el objeto no corresponde al tipo TimeSet de TOL |
|---|
| 162 | */ |
|---|
| 163 | @Override |
|---|
| 164 | public boolean isTimeSet() { |
|---|
| 165 | return false; |
|---|
| 166 | } |
|---|
| 167 | |
|---|
| 168 | /** |
|---|
| 169 | * Determina si el objeto corresponde al tipo Set de TOL |
|---|
| 170 | * |
|---|
| 171 | * @return <code>false</code> ya que el objeto no corresponde al tipo Set de TOL |
|---|
| 172 | */ |
|---|
| 173 | @Override |
|---|
| 174 | public boolean isSet() { |
|---|
| 175 | return false; |
|---|
| 176 | } |
|---|
| 177 | |
|---|
| 178 | /** |
|---|
| 179 | * Determina si el objeto corresponde al tipo Code de TOL |
|---|
| 180 | * |
|---|
| 181 | * @return <code>false</code> ya que el objeto no corresponde al tipo Code de TOL |
|---|
| 182 | */ |
|---|
| 183 | @Override |
|---|
| 184 | public boolean isCode() { |
|---|
| 185 | return false; |
|---|
| 186 | } |
|---|
| 187 | |
|---|
| 188 | /** |
|---|
| 189 | * Determina si el objeto representa una referencia a un objeto creado en TOL |
|---|
| 190 | * |
|---|
| 191 | * @return <code>true</code> ya que el objeto representa una referencia a un objeto creado en TOL |
|---|
| 192 | */ |
|---|
| 193 | @Override |
|---|
| 194 | public boolean isReference() { |
|---|
| 195 | return true; |
|---|
| 196 | } |
|---|
| 197 | |
|---|
| 198 | } |
|---|