public class OwExprNumericValue extends OwExprValue implements Comparable
The numeric value implementation.
Objects of this class represent floating point or integer numeric values.
The implementation relays on the Number Java implementation.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
| Constructor and Description |
|---|
OwExprNumericValue(double doubleNo_p)
Constructor
|
OwExprNumericValue(int number_p)
Constructor
|
OwExprNumericValue(Number number_p)
Constructor
|
OwExprNumericValue(Number number_p,
Class<?> javaType_p)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprNumericValue v1_p)
Stage 2 binary operator visitor acceptance method
|
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprStringValue v1_p)
Stage 2 binary operator visitor acceptance method
|
OwExprValue |
accept(OwExprBinaryOperator binaryOperator_p,
OwExprValue v2_p)
Stage 1 binary operator visitor acceptance method
|
OwExprValue |
accept(OwExprUnaryOperator unaryOperator_p)
Unary operator visitor acceptance method
|
OwExprNumericValue |
add(OwExprNumericValue numeric_p) |
int |
compareTo(Object o_p) |
OwExprValue |
div(OwExprNumericValue numeric_p) |
boolean |
equals(Object obj_p) |
int |
hashCode() |
OwExprValue |
mul(OwExprNumericValue numeric_p) |
OwExprNumericValue |
negate() |
OwExprValue |
reminder(OwExprNumericValue numeric_p) |
OwExprValue |
sub(OwExprNumericValue numeric_p) |
int |
toInt() |
Object |
toJavaObject(Class javaSuperType_p)
Java class conversion method.
|
String |
toString() |
accept, accept, accept, accept, at, fromJavaValue, fromJavaValue, function, getJavaType, getValuePropeties, hasProperty, length, propertypublic OwExprNumericValue(Number number_p, Class<?> javaType_p)
number_p - the inner numeric valuejavaType_p - original java typepublic OwExprNumericValue(Number number_p)
number_p - the inner numeric valuepublic OwExprNumericValue(int number_p)
number_p - the inner numeric valuepublic OwExprNumericValue(double doubleNo_p)
doubleNo_p - the inner numeric valuepublic final OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprValue v2_p) throws OwExprEvaluationException
OwExprValueaccept in class OwExprValuebinaryOperator_p - binary operator visitorv2_p - right side operator valueOwExprValueOwExprEvaluationException - if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public final OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprNumericValue v1_p) throws OwExprEvaluationException
OwExprValueaccept in class OwExprValuebinaryOperator_p - binary operator visitorv1_p - lef side operator valueOwExprValueOwExprEvaluationException - if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public final OwExprValue accept(OwExprBinaryOperator binaryOperator_p, OwExprStringValue v1_p) throws OwExprEvaluationException
OwExprValueaccept in class OwExprValuebinaryOperator_p - binary operator visitorv1_p - lef side operator valueOwExprValueOwExprEvaluationException - if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue accept(OwExprUnaryOperator unaryOperator_p) throws OwExprEvaluationException
OwExprValueaccept in class OwExprValueunaryOperator_p - binary operator visitorOwExprValueOwExprEvaluationException - if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprNumericValue add(OwExprNumericValue numeric_p)
public OwExprNumericValue negate()
new OwExprNumericValue(1).negate().equals(new OwExprNumericValue(-1))public OwExprValue sub(OwExprNumericValue numeric_p)
numeric_p - OwExprNumericValue representing this numeric value minus the numeric value of the numeric_p parameterpublic OwExprValue mul(OwExprNumericValue numeric_p)
numeric_p - OwExprNumericValue representing this numeric multiplied by the numeric value of the numeric_p parameterpublic OwExprValue div(OwExprNumericValue numeric_p) throws ArithmeticException
numeric_p - OwExprNumericValue representing this numeric divided by the numeric value of the numeric_p parameterArithmeticExceptionpublic OwExprValue reminder(OwExprNumericValue numeric_p) throws ArithmeticException
numeric_p - OwExprNumericValue representing reminder of the division of this numeric value and the numeric value of the numeric_p parameterArithmeticExceptionpublic int toInt()
public int compareTo(Object o_p)
compareTo in interface Comparablepublic Object toJavaObject(Class javaSuperType_p) throws OwExprEvaluationException
OwExprValuetoJavaObject in class OwExprValuejavaSuperType_p - Integer if javaSuperType_p is different from Double.class and Double.TYPEDouble otherwiseOwExprEvaluationExceptionCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.