pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes
Class DoubleValue

java.lang.Object
  |
  +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
        |
        +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.SingleValue
              |
              +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.AtomicValue
                    |
                    +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.DoubleValue

public class DoubleValue
extends AtomicValue

The DoubleValue class represents the real numbers.

Author:
Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com

Constructor Summary
DoubleValue(double value)
          Creates a new double value initialized with specified value.
DoubleValue(java.lang.Double value)
          Creates a new double value initialized with specified value.
 
Method Summary
 double doubleValue()
          Returns the double value as a double value.
 java.lang.String getTypeAsString()
          Returns a name of the result (QueryResult) type.
 java.lang.Double getValue()
          Returns the value of a double value.
 java.lang.String getValueAsString()
          Returns the double value as a string value.
 int intValue()
          Returns the double value as a integer value.
 QueryResult operatorABSOLUTEVALUE()
          Method responsible for unary absolute value operation.
 QueryResult operatorAVERAGE()
          Method responsible for unary average operation.
 BooleanValue operatorCOMPARE(QueryResult r)
          Method responsible for binary compare operation.
 QueryResult operatorCOSINE()
          Method responsible for unary cosine operation.
 QueryResult operatorDESCENDING()
          Method responsible for unary descending operation.
 QueryResult operatorDIVIDE(QueryResult r)
          Method responsible for binary divide operation.
 BooleanValue operatorEQUAL(QueryResult r)
          Method responsible for binary equal operation.
 QueryResult operatorEXPONENT()
          Method responsible for unary exponent operation.
 BooleanValue operatorGREATER(QueryResult r)
          Method responsible for binary greater operation.
 BooleanValue operatorGREATEREQUAL(QueryResult r)
          Method responsible for binary greater equal operation.
 QueryResult operatorLOGARITHM()
          Method responsible for unary logarithm operation.
 BooleanValue operatorLOWER(QueryResult r)
          Method responsible for binary lower operation.
 BooleanValue operatorLOWEREQUAL(QueryResult r)
          Method responsible for binary lower equal operation.
 QueryResult operatorMAXIMUM()
          Method responsible for unary maximum operation.
 QueryResult operatorMINIMUM()
          Method responsible for unary minimum operation.
 QueryResult operatorMINUS()
          Method responsible for unary plus operation.
 QueryResult operatorMINUS(QueryResult r)
          Method responsible for binary minus operation.
 QueryResult operatorMODULO(QueryResult r)
          Method responsible for binary modulo operation.
 BooleanValue operatorNOTEQUAL(QueryResult r)
          Method responsible for binary not equal operation.
 QueryResult operatorPLUS()
          Method responsible for unary plus operation.
 QueryResult operatorPLUS(QueryResult r)
          Method responsible for binary plus operation.
 QueryResult operatorPOWER(QueryResult r)
          Method responsible for binary power operation.
 QueryResult operatorSIGNUM()
          Method responsible for unary signum operation.
 QueryResult operatorSINE()
          Method responsible for unary sine operation.
 QueryResult operatorSQUAREROOT()
          Method responsible for unary square root operation.
 QueryResult operatorSUM()
          Method responsible for unary sum operation.
 QueryResult operatorTIMES(QueryResult r)
          Method responsible for binary times operation.
 DoubleValue operatorTODOUBLE()
          Method responsible for unary todouble operation.
 IntegerValue operatorTOINTEGER()
          Method responsible for unary tointeger operation.
 StringValue operatorTOSTRING()
          Method responsible for unary tostring operation.
 java.lang.String stringValue()
          Returns the double value as a string value.
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.AtomicValue
operatorDEREFERENCE, operatorFULLDEREFERENCE, operatorMIXEDDEREFERENCE, operatorPRINT, operatorSPECIALDEREFERENCE, operatorXMLPRINT, show
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.SingleValue
getNextResultAt, getNumberOfResults, operatorAS, operatorASCENDING, operatorBAG, operatorCOMMA, operatorCOUNT, operatorEXISTS, operatorGROUPAS, operatorINCLUSION, operatorSEQUENCE, operatorSTRUCT, operatorTOSINGLE, operatorUNION, operatorUNIQUE
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
getLongestTypeAsSpacesString, getPreparedTypeAsString, nested, operatorASSIGN, operatorCONDITION, operatorCONJUNCTION, operatorCREATE, operatorCREATE, operatorCREATELOCAL, operatorCREATELOCAL, operatorCREATEPERMANENT, operatorCREATEPERMANENT, operatorDELETE, operatorDIFFERENCE, operatorDISJUNCTION, operatorDIVIDEASSIGN, operatorINSERT, operatorINSERTINTO, operatorINTERSECTION, operatorMINUSASSIGN, operatorMODULOASSIGN, operatorNEGATION, operatorPLUSASSIGN, operatorPREDECREMENT, operatorPREINCREMENT, operatorPRINT, operatorRANGE, operatorRANGE, operatorRENAMETO, operatorSYMMETRICDIFFERENCE, operatorTIMESASSIGN, operatorTOBAG, operatorTOSEQUENCE, operatorTOSTRUCT, operatorUPDATETO, operatorXMLPRINT, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleValue

public DoubleValue(java.lang.Double value)
Creates a new double value initialized with specified value.
Parameters:
value - the initializing value.

DoubleValue

public DoubleValue(double value)
Creates a new double value initialized with specified value.
Parameters:
value - the initializing value.
Method Detail

getTypeAsString

public java.lang.String getTypeAsString()
Returns a name of the result (QueryResult) type.
Overrides:
getTypeAsString in class QueryResult
Returns:
a double result type name.
See Also:
QueryResult

getValueAsString

public java.lang.String getValueAsString()
Returns the double value as a string value.
Overrides:
getValueAsString in class AtomicValue
Returns:
the double value as a string value.

getValue

public java.lang.Double getValue()
Returns the value of a double value.
Returns:
the value of a double value.

intValue

public int intValue()
Returns the double value as a integer value.
Returns:
the double value as a integer value.

doubleValue

public double doubleValue()
Returns the double value as a double value.
Returns:
the double value as a double value.

stringValue

public java.lang.String stringValue()
Returns the double value as a string value.
Returns:
the double value as a string value.

operatorSQUAREROOT

public QueryResult operatorSQUAREROOT()
                               throws TypeMismatchException
Method responsible for unary square root operation.
Overrides:
operatorSQUAREROOT in class QueryResult
Parameters:
r - the right operand of the unary square root operator.
Returns:
the result of the unary square root operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorABSOLUTEVALUE

public QueryResult operatorABSOLUTEVALUE()
                                  throws TypeMismatchException
Method responsible for unary absolute value operation.
Overrides:
operatorABSOLUTEVALUE in class QueryResult
Parameters:
r - the right operand of the unary absolute value operator.
Returns:
the result of the unary absolute value operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorSIGNUM

public QueryResult operatorSIGNUM()
                           throws TypeMismatchException
Method responsible for unary signum operation.
Overrides:
operatorSIGNUM in class QueryResult
Parameters:
r - the right operand of the unary signum operator.
Returns:
the result of the unary signum operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorSINE

public QueryResult operatorSINE()
                         throws TypeMismatchException
Method responsible for unary sine operation.
Overrides:
operatorSINE in class QueryResult
Parameters:
r - the right operand of the unary sine operator.
Returns:
the result of the unary sine operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorCOSINE

public QueryResult operatorCOSINE()
                           throws TypeMismatchException
Method responsible for unary cosine operation.
Overrides:
operatorCOSINE in class QueryResult
Parameters:
r - the right operand of the unary cosine operator.
Returns:
the result of the unary cosine operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorEXPONENT

public QueryResult operatorEXPONENT()
                             throws TypeMismatchException
Method responsible for unary exponent operation.
Overrides:
operatorEXPONENT in class QueryResult
Parameters:
r - the right operand of the unary exponent operator.
Returns:
the result of the unary exponent operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorLOGARITHM

public QueryResult operatorLOGARITHM()
                              throws TypeMismatchException
Method responsible for unary logarithm operation.
Overrides:
operatorLOGARITHM in class QueryResult
Parameters:
r - the right operand of the unary logarithm operator.
Returns:
the result of the unary logarithm operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorSUM

public QueryResult operatorSUM()
                        throws TypeMismatchException
Method responsible for unary sum operation.
Overrides:
operatorSUM in class QueryResult
Parameters:
r - the right operand of the unary sum operator.
Returns:
the result of the unary sum operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorAVERAGE

public QueryResult operatorAVERAGE()
                            throws TypeMismatchException
Method responsible for unary average operation.
Overrides:
operatorAVERAGE in class QueryResult
Parameters:
r - the right operand of the unary average operator.
Returns:
the result of the unary average operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorMINIMUM

public QueryResult operatorMINIMUM()
                            throws TypeMismatchException
Method responsible for unary minimum operation.
Overrides:
operatorMINIMUM in class QueryResult
Parameters:
r - the right operand of the unary minimum operator.
Returns:
the result of the unary minimum operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorMAXIMUM

public QueryResult operatorMAXIMUM()
                            throws TypeMismatchException
Method responsible for unary maximum operation.
Overrides:
operatorMAXIMUM in class QueryResult
Parameters:
r - the right operand of the unary maximum operator.
Returns:
the result of the unary maximum operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorDESCENDING

public QueryResult operatorDESCENDING()
                               throws TypeMismatchException
Method responsible for unary descending operation.
Overrides:
operatorDESCENDING in class QueryResult
Parameters:
r - the right operand of the unary descending operator.
Returns:
the result of the unary descending operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorTOSTRING

public StringValue operatorTOSTRING()
                             throws TypeMismatchException
Method responsible for unary tostring operation.
Overrides:
operatorTOSTRING in class QueryResult
Parameters:
r - the right operand of the unary tostring operator.
Returns:
the result of the unary tostring operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
StringValue

operatorTOINTEGER

public IntegerValue operatorTOINTEGER()
                               throws TypeMismatchException
Method responsible for unary tointeger operation.
Overrides:
operatorTOINTEGER in class QueryResult
Parameters:
r - the right operand of the unary tointeger operator.
Returns:
the result of the unary tointeger operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
IntegerValue

operatorTODOUBLE

public DoubleValue operatorTODOUBLE()
                             throws TypeMismatchException
Method responsible for unary todouble operation.
Overrides:
operatorTODOUBLE in class QueryResult
Parameters:
r - the right operand of the unary todouble operator.
Returns:
the result of the unary todouble operation.
Throws:
TypeMismatchException - if type mismatch occurs.

operatorPLUS

public QueryResult operatorPLUS(QueryResult r)
                         throws TypeMismatchException
Method responsible for binary plus operation.
Overrides:
operatorPLUS in class QueryResult
Parameters:
r - the right operand of the binary plus operator.
Returns:
the result of the binary plus operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorPLUS

public QueryResult operatorPLUS()
                         throws TypeMismatchException
Description copied from class: QueryResult
Method responsible for unary plus operation.
Overrides:
operatorPLUS in class QueryResult
Following copied from class: pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
Returns:
by default, it always throws TypeMismatchException.
Throws:
TypeMismatchException - if type mismatch occurs.

operatorMINUS

public QueryResult operatorMINUS(QueryResult r)
                          throws TypeMismatchException
Method responsible for binary minus operation.
Overrides:
operatorMINUS in class QueryResult
Parameters:
r - the right operand of the binary minus operator.
Returns:
the result of the binary minus operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorMINUS

public QueryResult operatorMINUS()
                          throws TypeMismatchException
Description copied from class: QueryResult
Method responsible for unary plus operation.
Overrides:
operatorMINUS in class QueryResult
Following copied from class: pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
Returns:
by default, it always throws TypeMismatchException.
Throws:
TypeMismatchException - if type mismatch occurs.

operatorTIMES

public QueryResult operatorTIMES(QueryResult r)
                          throws TypeMismatchException
Method responsible for binary times operation.
Overrides:
operatorTIMES in class QueryResult
Parameters:
r - the right operand of the binary times operator.
Returns:
the result of the binary times operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorDIVIDE

public QueryResult operatorDIVIDE(QueryResult r)
                           throws TypeMismatchException
Method responsible for binary divide operation.
Overrides:
operatorDIVIDE in class QueryResult
Parameters:
r - the right operand of the binary divide operator.
Returns:
the result of the binary divide operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorEQUAL

public BooleanValue operatorEQUAL(QueryResult r)
                           throws TypeMismatchException
Method responsible for binary equal operation.
Overrides:
operatorEQUAL in class QueryResult
Parameters:
r - the right operand of the binary equal operator.
Returns:
the result of the binary equal operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue

operatorNOTEQUAL

public BooleanValue operatorNOTEQUAL(QueryResult r)
                              throws TypeMismatchException
Method responsible for binary not equal operation.
Overrides:
operatorNOTEQUAL in class QueryResult
Parameters:
r - the right operand of the binary not equal operator.
Returns:
the result of the binary not equal operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue

operatorGREATER

public BooleanValue operatorGREATER(QueryResult r)
                             throws TypeMismatchException
Method responsible for binary greater operation.
Overrides:
operatorGREATER in class QueryResult
Parameters:
r - the right operand of the binary greater operator.
Returns:
the result of the binary greater operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue

operatorLOWER

public BooleanValue operatorLOWER(QueryResult r)
                           throws TypeMismatchException
Method responsible for binary lower operation.
Overrides:
operatorLOWER in class QueryResult
Parameters:
r - the right operand of the binary lower operator.
Returns:
the result of the binary lower operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue

operatorLOWEREQUAL

public BooleanValue operatorLOWEREQUAL(QueryResult r)
                                throws TypeMismatchException
Method responsible for binary lower equal operation.
Overrides:
operatorLOWEREQUAL in class QueryResult
Parameters:
r - the right operand of the binary lower equal operator.
Returns:
the result of the binary lower equal operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue

operatorGREATEREQUAL

public BooleanValue operatorGREATEREQUAL(QueryResult r)
                                  throws TypeMismatchException
Method responsible for binary greater equal operation.
Overrides:
operatorGREATEREQUAL in class QueryResult
Parameters:
r - the right operand of the binary greater equal operator.
Returns:
the result of the binary greater equal operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue

operatorMODULO

public QueryResult operatorMODULO(QueryResult r)
                           throws TypeMismatchException
Method responsible for binary modulo operation.
Overrides:
operatorMODULO in class QueryResult
Parameters:
r - the right operand of the binary modulo operator.
Returns:
the result of the binary modulo operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorPOWER

public QueryResult operatorPOWER(QueryResult r)
                          throws TypeMismatchException
Method responsible for binary power operation.
Overrides:
operatorPOWER in class QueryResult
Parameters:
r - the right operand of the binary power operator.
Returns:
the result of the binary power operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue

operatorCOMPARE

public BooleanValue operatorCOMPARE(QueryResult r)
                             throws TypeMismatchException
Method responsible for binary compare operation.
Overrides:
operatorCOMPARE in class QueryResult
Parameters:
r - the right operand of the binary compare operator.
Returns:
the result of the binary compare operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue