|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.wewebu.expression.language.OwExprValue
com.wewebu.expression.language.OwExprNumericValue
public class OwExprNumericValue
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 Summary | |
|---|---|
OwExprNumericValue(double doubleNo_p)
Constructor |
|
OwExprNumericValue(int number_p)
Constructor |
|
OwExprNumericValue(Number number_p)
Constructor |
|
OwExprNumericValue(Number number_p,
Class<?> javaType_p)
Constructor |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class com.wewebu.expression.language.OwExprValue |
|---|
accept, accept, accept, accept, at, fromJavaValue, fromJavaValue, function, getJavaType, getValuePropeties, hasProperty, length, property |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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 value| Method Detail |
|---|
public final OwExprValue accept(OwExprBinaryOperator binaryOperator_p,
OwExprValue v2_p)
throws OwExprEvaluationException
OwExprValue
accept in class OwExprValuebinaryOperator_p - binary operator visitorv2_p - right side operator value
OwExprValue
OwExprEvaluationException - 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
OwExprValue
accept in class OwExprValuebinaryOperator_p - binary operator visitorv1_p - lef side operator value
OwExprValue
OwExprEvaluationException - 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
OwExprValue
accept in class OwExprValuebinaryOperator_p - binary operator visitorv1_p - lef side operator value
OwExprValue
OwExprEvaluationException - 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
OwExprValue
accept in class OwExprValueunaryOperator_p - binary operator visitor
OwExprValue
OwExprEvaluationException - 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 parameter
public OwExprValue div(OwExprNumericValue numeric_p)
throws ArithmeticException
numeric_p -
OwExprNumericValue representing this numeric divided by the numeric value of the numeric_p parameter
ArithmeticException
public 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 parameter
ArithmeticExceptionpublic boolean equals(Object obj_p)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int toInt()
public String toString()
toString in class Objectpublic int compareTo(Object o_p)
compareTo in interface Comparable
public Object toJavaObject(Class javaSuperType_p)
throws OwExprEvaluationException
OwExprValue
toJavaObject in class OwExprValuejavaSuperType_p -
Integer if javaSuperType_p is different from Double.class and Double.TYPEDouble otherwise
OwExprEvaluationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||