ExpUnaria.java

Go to the documentation of this file.
00001 package plp.expressions1.expression;
00002 
00006 public abstract class ExpUnaria implements Expressao {
00007 
00011         private Expressao exp;
00012         
00016         private String operador;
00017         
00023         public ExpUnaria(Expressao exp, String operador) {
00024                 this.exp = exp;
00025                 this.operador = operador;
00026         }
00027 
00033         public Expressao getExp() {
00034                 return exp;
00035         }
00036 
00042         public String getOperador() {
00043                 return operador;
00044         }
00045 
00051         public String toString() {
00052                 StringBuffer sb = new StringBuffer();
00053                 sb.append(operador);
00054                 sb.append(' ');
00055                 sb.append(exp.toString());
00056                 return sb.toString();
00057         }
00058 
00066         public boolean checaTipo() {
00067                 return getExp().checaTipo() && this.checaTipoElementoTerminal();
00068         }
00069 
00074         protected abstract boolean checaTipoElementoTerminal();
00075 }

Generated on Tue Sep 12 21:51:58 2006 for PLP by  doxygen 1.4.7