Package quadbase.reportdesigner.lang
Class NumericObject
java.lang.Object
quadbase.reportdesigner.lang.NumericObject
- All Implemented Interfaces:
IObject,IFunctionConstants
This class is used to implement formulas for columns contain numeric data
-
Field Summary
Fields inherited from interface quadbase.util.IFunctionConstants
ABS, ACOS, ADD, ADDTIME, AM_PM, AND, ASIN, ATAN, ATAN2, AVERAGE, B_COL, BOOL, BOOL_FUNC, BOOL_NAME, CALENDAR_CONST, CEIL, COL, COS, COUNT, CURRDATE, CURRDATETIME, CURRTIME, D_COL, DATE, DATE_FUNC, DATE_NAME, DATETIME, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DAYDIFF, DAYOFWEEK, DECL, DIVIDE, E, EQUALS, ERA, EXP, FACTORIAL, FALSE, FLOOR, GETAMPM, GETERA, GETMONTH, GREATER, GREATEREQUAL, HOUR, HOUR_OF_DAY, ID, IEEEREMAINDER, IFELSE_B, IFELSE_D, IFELSE_N, IFELSE_S, INDEXOF, INSERT, LASTINDEXOF, LESS, LESSEQUAL, LOG, MAX, MAXLENGTH, MEDIAN, MILLISECOND, MIN, MINUTE, MOD, MONTH, MULTIPLY, N_COL, NAND, NEW_DATE_NAME, NEW_NUM_NAME, NEW_STR_NAME, NOR, NOT, NUM, NUM_FUNC, NUM_NAME, OR, OTHER_FUNC_NAME, PAGE, PARAM, PI, POW, PRINTDATE, PRINTDATETIME, PRINTTIME, RANDOM, REPLACE, RINT, ROLLTIME, S_COL, SECOND, SIN, SQRT, STDDEV, STR, STR_FUNC, STR_NAME, STRCAT, STRLEN, SUBSTRING, SUBTRACT, SUMSQUARE, TAN, TD_FUNC_NAME, THIS, TODATE, TODEGREES, TOLOWERCASE, TONUMERIC, TORADIANS, TOSTRING, TOTALPAGES, TOTALSECTIONS, TOUPPERCASE, TRUE, VARIANCE, WEEK_OF_MONTH, WEEK_OF_YEAR, WITHIN, XNOR, XOR, YEAR -
Constructor Summary
ConstructorsModifierConstructorDescriptionNumericObject(byte val) Create a new NumericObject using specified byteNumericObject(double number) Create a new NumericObject using specified doubleNumericObject(float number) Create a new NumericObject using specified floatNumericObject(int number) Create a new NumericObject using specified intNumericObject(long number) Create a new NumericObject using specified longNumericObject(short number) Create a new NumericObject using specified shortprotectedNumericObject(String formula, int sqlType) Create a new NumericObject using specified formula and SQL type -
Method Summary
Modifier and TypeMethodDescriptionstatic NumericObjectabs(NumericObject a) Absolute of the NumericObjectstatic NumericObjectArc cosine of specified NumericObjectstatic NumericObjectadd(NumericObject[] f) Add every element of the NumericObject arraystatic NumericObjectadd(NumericObject f1, NumericObject f2) Add the two NumericObjectsstatic NumericObjectArc sine of specified NumericObjectstatic NumericObjectArc tan of specified NumericObjectstatic NumericObjectatan2(NumericObject a, NumericObject b) Arc tan of specified NumericObjects.static NumericObjectaverage(NumericObject[] f) Average of the elements of the NumericObject arraystatic NumericObjectCeiling of the NumericObjectstatic NumericObjectcos(NumericObject a) Cosine of specified NumericObjectstatic NumericObjectcount(NumericObject[] f) Number of elements in the NumericObject arraystatic NumericObjectdivide(NumericObject numerator, NumericObject denominator) Divide numerator by denominatorstatic NumericObjecte()Base of natural logstatic NumericObjectexp(NumericObject a) Exponential raised to the power of the NumericObjectstatic NumericObjectFactorial of the specified NumericObjectstatic NumericObjectFloor of the NumericObjectstatic NumericObjectgetColumnValue(int colInfoIndex) Returns the column value of the specific columnstatic NumericObjectgetColumnValue(int colInfoIndex, int sqlType) Returns the column value of the specified columnstatic NumericObjectgetColumnValue(int colInfoIndex, short aggregation) Returns the Column value of specified column after doing the specified aggregation.static NumericObjectgetColumnValue(int colInfoIndex, short aggregation, int sqlType) Returns the Column value of specified column after doing the specified aggregation.static NumericObjectgetColumnValue(NumericObject colInfoIndex, int sqlType) Returns the column value of the specified columnstatic NumericObjectgetColumnValue(NumericObject colInfoIndex, short aggregation, int sqlType) Returns the Column value of specified column after doing the specified aggregation.Returns the formulaintReturns the SQL typestatic NumericObjectIEEERemainder(NumericObject dividend, NumericObject divisor) Computes the remainder operator on two arguments based on the IEEE754 standardstatic NumericObjectlog(NumericObject a) Natural log of the NumericObjectstatic NumericObjectmax(NumericObject[] f) Returns maximum from the elements of the NumericObject arraystatic NumericObjectmax(NumericObject a, NumericObject b) Returns maximum from the two NumericObjectsstatic NumericObjectmin(NumericObject[] f) Returns manimum from the elements of the NumericObject arraystatic NumericObjectmin(NumericObject a, NumericObject b) Returns manimum from the two NumericObjectsstatic NumericObjectmod(NumericObject numerator, NumericObject denominator) Returns the remainder after dividing denominator from numeratorstatic NumericObjectmultiply(NumericObject[] f) Multiply every element of the NumericObject arraystatic NumericObjectmultiply(NumericObject f1, NumericObject f2) Multiply the two NumericObjectsstatic NumericObjectpi()Pi valuestatic NumericObjectpow(NumericObject a, NumericObject b) Computers b raised to astatic NumericObjectrandom()Random number generatorstatic NumericObjectDouble value closest to a and equal to a integerstatic NumericObjectsin(NumericObject a) Sine of specified NumericObjectstatic NumericObjectSquare root of the NumericObjectstatic NumericObjectStandard Deviation of the elements of the NumericObject arraystatic NumericObjectsubtract(NumericObject[] f) Subtract the rest elements of NumbericObject array from the first elementstatic NumericObjectsubtract(NumericObject f1, NumericObject f2) Subtract NumericObject f2 from NumericObject f1static NumericObjectsumSquare(NumericObject[] f) Adds the squares of the elements of the NumericObject arraystatic NumericObjecttan(NumericObject a) Tan of specified NumericObjectstatic NumericObjecttoDegrees(NumericObject angrad) Converts angle in radians to degreesstatic NumericObjecttoRadians(NumericObject angdeg) Converts angle in degrees to radiansstatic StringObjectConvert NumericObject to stringstatic StringObjecttoString(NumericObject a, NumericObject dp) Convert NumericObject to string with specified round up decimal pointstatic StringObjecttoString(NumericObject a, NumericObject dp, BooleanObject rup) Convert NumericObject to string with specified decimal pointstatic NumericObjectvariance(NumericObject[] f) Variance of the elements of the NumericObject array
-
Constructor Details
-
NumericObject
public NumericObject(short number) Create a new NumericObject using specified short -
NumericObject
public NumericObject(int number) Create a new NumericObject using specified int -
NumericObject
public NumericObject(long number) Create a new NumericObject using specified long -
NumericObject
public NumericObject(float number) Create a new NumericObject using specified float -
NumericObject
public NumericObject(double number) Create a new NumericObject using specified double -
NumericObject
public NumericObject(byte val) Create a new NumericObject using specified byte -
NumericObject
Create a new NumericObject using specified formula and SQL type
-
-
Method Details
-
getFormula
Returns the formula- Specified by:
getFormulain interfaceIObject
-
getSQLType
public int getSQLType()Returns the SQL type- Specified by:
getSQLTypein interfaceIObject
-
getColumnValue
Returns the column value of the specific column -
getColumnValue
Returns the column value of the specified column -
getColumnValue
Returns the column value of the specified column -
getColumnValue
Returns the Column value of specified column after doing the specified aggregation. The different values for aggregation are available under quadbase.reportdesigner.util.IAggregateConstants -
getColumnValue
Returns the Column value of specified column after doing the specified aggregation. The different values for aggregation are available under quadbase.reportdesigner.util.IAggregateConstants -
getColumnValue
public static NumericObject getColumnValue(NumericObject colInfoIndex, short aggregation, int sqlType) Returns the Column value of specified column after doing the specified aggregation. The different values for aggregation are available under quadbase.reportdesigner.util.IAggregateConstants -
add
Add the two NumericObjects -
add
Add every element of the NumericObject array -
subtract
Subtract NumericObject f2 from NumericObject f1 -
subtract
Subtract the rest elements of NumbericObject array from the first element -
multiply
Multiply the two NumericObjects -
multiply
Multiply every element of the NumericObject array -
divide
Divide numerator by denominator -
mod
Returns the remainder after dividing denominator from numerator -
IEEERemainder
Computes the remainder operator on two arguments based on the IEEE754 standard -
acos
Arc cosine of specified NumericObject -
cos
Cosine of specified NumericObject -
asin
Arc sine of specified NumericObject -
sin
Sine of specified NumericObject -
atan
Arc tan of specified NumericObject -
atan2
Arc tan of specified NumericObjects. Converts rectangular coordinates (a, b) to polar (r, thetha) -
tan
Tan of specified NumericObject -
ceil
Ceiling of the NumericObject -
exp
Exponential raised to the power of the NumericObject -
floor
Floor of the NumericObject -
log
Natural log of the NumericObject -
toDegrees
Converts angle in radians to degrees -
toRadians
Converts angle in degrees to radians -
pow
Computers b raised to a -
random
Random number generator -
rint
Double value closest to a and equal to a integer -
sqrt
Square root of the NumericObject -
abs
Absolute of the NumericObject -
max
Returns maximum from the two NumericObjects -
max
Returns maximum from the elements of the NumericObject array -
min
Returns manimum from the two NumericObjects -
min
Returns manimum from the elements of the NumericObject array -
pi
Pi value -
e
Base of natural log -
count
Number of elements in the NumericObject array -
sumSquare
Adds the squares of the elements of the NumericObject array -
average
Average of the elements of the NumericObject array -
variance
Variance of the elements of the NumericObject array -
standardDeviation
Standard Deviation of the elements of the NumericObject array -
factorial
Factorial of the specified NumericObject -
toString
Convert NumericObject to string -
toString
Convert NumericObject to string with specified round up decimal point -
toString
Convert NumericObject to string with specified decimal point
-