|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuba.db.sql.language.ComparisonBehavior
public abstract class ComparisonBehavior
Clase base para simplificar la creación de objetos que representen expresiones boleanas binarias.
| Constructor Summary | |
|---|---|
ComparisonBehavior(SingleValue left,
SingleValue right)
Crea una operacion booleana de dos terminos. |
|
| Method Summary | |
|---|---|
protected abstract boolean |
compareValues(java.lang.Comparable leftValue,
java.lang.Comparable rightValue)
Las sub-clases deben implementar este método para comparar dos valores. |
boolean |
isTrueWith(EvaluationContext context)
Esta implementación obtiene los valores de ambos terminos usando SingleValue.valueWith(EvaluationContext) y luego delega la
comparación a compareValues(Comparable, Comparable). |
SingleValue |
left()
Retorna el termino a la izquierda. |
protected abstract java.lang.String |
operatorAsString()
Las subclases deben implementar este método retornando la representacion en String del operador que representan. |
SingleValue |
right()
Retorna el termino a la derecha. |
java.lang.String |
toString()
|
java.lang.Object |
valueWith(EvaluationContext context)
Evalua la condición usando el método BooleanValue.isTrueWith(EvaluationContext), pero retorna una
instancia de Boolean para ser compatible con la interfaz
SingleValue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface uba.db.sql.language.Visitable |
|---|
accept |
| Constructor Detail |
|---|
public ComparisonBehavior(SingleValue left,
SingleValue right)
left - termino izquierdo.right - termino derecho.| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()protected abstract java.lang.String operatorAsString()
public java.lang.Object valueWith(EvaluationContext context)
BooleanValue.isTrueWith(EvaluationContext), pero retorna una
instancia de Boolean para ser compatible con la interfaz
SingleValue.
valueWith in interface SingleValuecontext - contexto de evaluación.
Boolean con el valor de verdad de
BooleanValue.isTrueWith(EvaluationContext)public boolean isTrueWith(EvaluationContext context)
SingleValue.valueWith(EvaluationContext) y luego delega la
comparación a compareValues(Comparable, Comparable).
isTrueWith in interface BooleanValuecontext - contexto de evaluación.
BooleanValue.isTrueWith(EvaluationContext)public SingleValue left()
public SingleValue right()
protected abstract boolean compareValues(java.lang.Comparable leftValue,
java.lang.Comparable rightValue)
leftValue - valor a la izquierda.rightValue - valor a la derecha
isTrueWith(EvaluationContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||