tecgraf.javautils.jexpression.parser.model
Class Question

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

public class Question
extends Exp

Classe que armazena a operação ternária de 'if-then-else'. Ex: a ? b : c, a < b ? a : b

Author:
Tecgraf

Constructor Summary
Question(Exp condition, Exp then, Exp otherwise)
          Construtor.
 
Method Summary
 Exp getCondition()
          Condição.
 Exp getOtherwise()
          Caso contrário.
 Exp getThen()
          Ação.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Question

public Question(Exp condition,
                Exp then,
                Exp otherwise)
Construtor.

Parameters:
condition - condição.
then - ação.
otherwise - caso contrário.
Method Detail

getCondition

public Exp getCondition()
Condição.

Returns:
condição.

getThen

public Exp getThen()
Ação.

Returns:
ação.

getOtherwise

public Exp getOtherwise()
Caso contrário.

Returns:
caso contrário.

toString

public String toString()

Specified by:
toString in class Exp


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