ExpNot.java

Go to the documentation of this file.
00001 package plp.expressions1.expression;
00002 
00003 import plp.expressions1.util.Tipo;
00004 
00008 public class ExpNot extends ExpUnaria{
00009 
00016         public ExpNot( Expressao exp) {
00017                 super(exp, "~");
00018         }
00019 
00023         public Valor avaliar() {
00024                 return new ValorBooleano(!((ValorBooleano) getExp().avaliar()).valor());
00025         }
00026 
00033         protected boolean checaTipoElementoTerminal() {
00034                 return (getExp().getTipo().eBooleano());
00035         }
00036 
00042         public Tipo getTipo() {
00043                 return Tipo.TIPO_BOOLEANO;
00044         }
00045 
00046 }

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