tecgraf.javautils.jexpression.parser.model
Class BinaryOp

java.lang.Object
  extended by tecgraf.javautils.jexpression.parser.model.Exp
      extended by tecgraf.javautils.jexpression.parser.model.BinaryOp

public class BinaryOp
extends Exp

Classe que armazena uma operação binária. As operações binárias possíveis são listadas abaixo: Operadores relacionais: "<=", "<", ">=", ">", "==", "!=", "&&", "||"
Operadores aritméticos: "+", "-", "*", "/", "^"
Abaixo listamos os outros tipos de operadores da linguagem. Operador ternário: Question
Operador de acesso a campo: Field
Operadores unários: UnaryOp Ex: a <= b, a + b * c, a || b, a == b, a != b

Author:
Tecgraf

Constructor Summary
BinaryOp(Exp first, Symbol op, Exp second)
          Construtor.
 
Method Summary
 Exp getFirst()
          Primeiro operando.
 Symbol getOp()
          Operador.
 Exp getSecond()
          Segundo operando.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryOp

public BinaryOp(Exp first,
                Symbol op,
                Exp second)
Construtor.

Parameters:
first - primeiro operando.
op - operador.
second - segundo operando
Method Detail

getFirst

public Exp getFirst()
Primeiro operando.

Returns:
operando.

getOp

public Symbol getOp()
Operador.

Returns:
operador.

getSecond

public Exp getSecond()
Segundo operando.

Returns:
operando.

toString

public String toString()

Specified by:
toString in class Exp


Copyright © 2007–2014 Tecgraf/PUC-Rio. All rights reserved.