Package org.eclipse.wst.xml.xpath2.processor.internal.types
public class XSDecimal extends org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTypeA representation of the Decimal datatype
Constructor Summary |
XSDecimal() |
XSDecimal(java.math.BigDecimal x) |
XSDecimal(java.lang.String x) |
Method Summary | |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType | abs() Absolutes the number stored |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType | ceiling() Returns the smallest integer greater than the number stored |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Creates a new result sequence consisting of the retrievable decimal number in the supplied result sequence |
protected org.eclipse.wst.xml.xpath2.api.Item | convertArg(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg) |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | div(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical division operator between this XSDecimal and the supplied ResultSequence. |
public double | double_value() Retrieves the actual value of the number stored |
public boolean | eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType at
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext) Equality comparison between this number and the supplied representation. |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType | floor() Returns the largest integer smaller than the number stored |
public java.lang.Object | getNativeValue() |
public java.lang.String | getStringValue() Retrieves a String representation of the Decimal value stored |
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition | getTypeDefinition() |
public java.math.BigDecimal | getValue() |
public boolean | gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context) Comparison between this number and the supplied representation. |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | idiv(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical integer division operator between this XSDecimal and the supplied ResultSequence. Due to no numeric type promotion or conversion, the ResultSequence must be of type XSDecimal. |
protected boolean | isLexicalValue(java.lang.String value) |
public boolean | lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context) Comparison between this number and the supplied representation. |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical subtraction operator between this XSDecimal and the supplied ResultSequence. |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | mod(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical modulus operator between this XSDecimal and the supplied ResultSequence. Due to no numeric type promotion or conversion, the ResultSequence must be of type XSDecimal. |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical addition operator between this XSDecimal and the supplied ResultSequence. Due to no numeric type promotion or conversion, the ResultSequence must be of type XSDecimal. |
public static java.math.BigDecimal | remainder(java.math.BigDecimal value
,
java.math.BigDecimal divisor) |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType | round() Returns the closest integer of the number stored. |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType | round_half_to_even() Returns the closest integer of the number stored. |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType | round_half_to_even(int precision) Returns the closest integer of the number stored with the specified precision. |
public void | set_double(double x) Sets the number stored to that supplied |
public java.lang.String | string_type() Retrieves the datatype's full pathname |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | times(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical multiplication operator between this XSDecimal and the supplied ResultSequence. |
public java.lang.String | type_name() Retrieves the datatype's name |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | unary_minus() Negation of the number stored |
public boolean | zero() Check if this XSDecimal represents 0 |
Constructor Detail |
public XSDecimal()
Initiates a representation of 0.0
public XSDecimal(java.math.BigDecimal x)
Initiates a representation of the supplied number
public XSDecimal(java.lang.String x)
Methods Detail |
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType abs()
Absolutes the number stored
org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType
- A XSDecimal representing the absolute value of the number stored
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType ceiling()
Returns the smallest integer greater than the number stored
org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType
- A XSDecimal representing the smallest integer greater than the number stored
public org.eclipse.wst.xml.xpath2.api.ResultSequence constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Creates a new result sequence consisting of the retrievable decimal number in the supplied result sequence
arg
- The result sequence from which to extract the decimal number.
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A new result sequence consisting of the decimal number supplied.
org.eclipse.wst.xml.xpath2.processor.DynamicError
protected org.eclipse.wst.xml.xpath2.api.Item convertArg(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg)
arg
org.eclipse.wst.xml.xpath2.api.Item
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence div(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical division operator between this XSDecimal and the supplied ResultSequence.
arg
- The ResultSequence to perform a division with
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSDecimal consisting of the result of the mathematical division.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public double double_value()
Retrieves the actual value of the number stored
double
- The actual value of the number stored
public boolean eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType at
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)
Equality comparison between this number and the supplied representation.
at
- Representation to be compared with (must currently be of type XSDecimal)
dynamicContext
boolean
- True if the 2 representation represent the same number. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType floor()
Returns the largest integer smaller than the number stored
org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType
- A XSDecimal representing the largest integer smaller than the number stored
public java.lang.Object getNativeValue()
java.lang.Object
public java.lang.String getStringValue()
Retrieves a String representation of the Decimal value stored
java.lang.String
- String representation of the Decimal value stored
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getTypeDefinition()
org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition
public java.math.BigDecimal getValue()
java.math.BigDecimal
public boolean gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison between this number and the supplied representation.
arg
- Representation to be compared with (must currently be of type XSDecimal)
context
boolean
- True if the supplied type represents a number smaller than this one stored. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence idiv(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical integer division operator between this XSDecimal and the supplied ResultSequence. Due to no numeric type promotion or conversion, the ResultSequence must be of type XSDecimal.
arg
- The ResultSequence to perform an integer division with
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSInteger consisting of the result of the mathematical integer division.
org.eclipse.wst.xml.xpath2.processor.DynamicError
protected boolean isLexicalValue(java.lang.String value)
value
boolean
public boolean lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison between this number and the supplied representation.
arg
- Representation to be compared with (must currently be of type XSDecimal)
context
boolean
- True if the supplied type represents a number greater than this one stored. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical subtraction operator between this XSDecimal and the supplied ResultSequence.
arg
- The ResultSequence to perform a subtraction with
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSDecimal consisting of the result of the mathematical subtraction.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence mod(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical modulus operator between this XSDecimal and the supplied ResultSequence. Due to no numeric type promotion or conversion, the ResultSequence must be of type XSDecimal.
arg
- The ResultSequence to perform a modulus with
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSDecimal consisting of the result of the mathematical modulus.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical addition operator between this XSDecimal and the supplied ResultSequence. Due to no numeric type promotion or conversion, the ResultSequence must be of type XSDecimal.
arg
- The ResultSequence to perform an addition with
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSDecimal consisting of the result of the mathematical addition.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.math.BigDecimal remainder(java.math.BigDecimal value
,
java.math.BigDecimal divisor)
value
divisor
java.math.BigDecimal
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType round()
Returns the closest integer of the number stored.
org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType
- A XSDecimal representing the closest long of the number stored.
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType round_half_to_even()
Returns the closest integer of the number stored.
org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType
- A XSDecimal representing the closest long of the number stored.
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType round_half_to_even(int precision)
Returns the closest integer of the number stored with the specified precision.
precision
- An integer precision
org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType
- A XSDecimal representing the closest long of the number stored.
public void set_double(double x)
Sets the number stored to that supplied
x
- Number to be stored
public java.lang.String string_type()
Retrieves the datatype's full pathname
java.lang.String
- "xs:decimal" which is the datatype's full pathname
public org.eclipse.wst.xml.xpath2.api.ResultSequence times(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical multiplication operator between this XSDecimal and the supplied ResultSequence.
arg
- The ResultSequence to perform a multiplication with
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSDecimal consisting of the result of the mathematical multiplication.
public java.lang.String type_name()
Retrieves the datatype's name
java.lang.String
- "decimal" which is the datatype's name
public org.eclipse.wst.xml.xpath2.api.ResultSequence unary_minus()
Negation of the number stored
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSDecimal representing the negation of this XSDecimal
public boolean zero()
Check if this XSDecimal represents 0
boolean
- True if this XSDecimal represents 0. False otherwise