blob: 6362ad9ee6b0679e9ef896e3829152a227ff43bf [file] [log] [blame]
<html><body><p><font size="+1"><strong>Package org.eclipse.wst.xml.xpath2.processor.internal.types</strong></font></p><hr><h2><font size="-1"><strong>org.eclipse.wst.xml.xpath2.processor.internal.types</strong></font><br>
Class XSDecimal</h2><br><hr><pre>public class <strong>XSDecimal</strong>
extends org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</pre>A representation of the Decimal datatype<hr><table width="100%" border="1"><tr bgcolor="#CCCCFF"><td width="100%"><h2>Constructor Summary</h2></td></tr><tr><td><code><strong><a href="#con_XSDecimal">XSDecimal</a></strong>()</code></td></tr><tr><td><code><strong><a href="#con_XSDecimal">XSDecimal</a></strong>(java.math.BigDecimal x)</code></td></tr><tr><td><code><strong><a href="#con_XSDecimal">XSDecimal</a></strong>(java.lang.String x)</code></td></tr></table><br><table width="100%" border="1"><tr cols="2" bgcolor="#CCCCFF"><td colspan="2" width="100%"><h2>Method Summary</h2></td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code></td><td width="" align="left"><code><a href="#method_abs">abs</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Absolutes the number stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code></td><td width="" align="left"><code><a href="#method_ceiling">ceiling</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Returns the smallest integer greater than the number stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_constructor">constructor</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Creates a new result sequence consisting of the retrievable decimal
number in the supplied result sequence</td></tr><tr valign="top"><td width="20%" align="right"><code>protected org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType</code></td><td width="" align="left"><code><a href="#method_convertArg">convertArg</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_div">div</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Mathematical division operator between this XSDecimal and the supplied
ResultSequence.</td></tr><tr valign="top"><td width="20%" align="right"><code>public double</code></td><td width="" align="left"><code><a href="#method_double_value">double_value</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the actual value of the number stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_eq">eq</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType at
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Equality comparison between this number and the supplied representation.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code></td><td width="" align="left"><code><a href="#method_floor">floor</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Returns the largest integer smaller than the number stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.math.BigDecimal</code></td><td width="" align="left"><code><a href="#method_getValue">getValue</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_gt">gt</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Comparison between this number and the supplied representation.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_idiv">idiv</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
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.</td></tr><tr valign="top"><td width="20%" align="right"><code>protected boolean</code></td><td width="" align="left"><code><a href="#method_isLexicalValue">isLexicalValue</a>(java.lang.String value)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_lt">lt</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Comparison between this number and the supplied representation.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_minus">minus</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Mathematical subtraction operator between this XSDecimal and the supplied
ResultSequence.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_mod">mod</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
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.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_plus">plus</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
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.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code></td><td width="" align="left"><code><a href="#method_round">round</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Returns the closest integer of the number stored.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code></td><td width="" align="left"><code><a href="#method_round_half_to_even">round_half_to_even</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Returns the closest integer of the number stored.</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code></td><td width="" align="left"><code><a href="#method_round_half_to_even">round_half_to_even</a>(int precision)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Returns the closest integer of the number stored with the specified precision.</td></tr><tr valign="top"><td width="20%" align="right"><code>public void</code></td><td width="" align="left"><code><a href="#method_set_double">set_double</a>(double x)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Sets the number stored to that supplied</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.String</code></td><td width="" align="left"><code><a href="#method_string_type">string_type</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the datatype's full pathname</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.String</code></td><td width="" align="left"><code><a href="#method_string_value">string_value</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves a String representation of the Decimal value stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_times">times</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Mathematical multiplication operator between this XSDecimal and the
supplied ResultSequence.</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.String</code></td><td width="" align="left"><code><a href="#method_type_name">type_name</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the datatype's name</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_unary_minus">unary_minus</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Negation of the number stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_zero">zero</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Check if this XSDecimal represents 0</td></tr></table><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
Constructor Detail
</h2></td></tr></table><h2><a name="con_XSDecimal">XSDecimal</a></h2><p><code>public <strong>XSDecimal</strong>()</code></p><p>Initiates a representation of 0.0</p><hr><h2><a name="con_XSDecimal">XSDecimal</a></h2><p><code>public <strong>XSDecimal</strong>(java.math.BigDecimal x)</code></p><p>Initiates a representation of the supplied number</p><hr><h2><a name="con_XSDecimal">XSDecimal</a></h2><p><code>public <strong>XSDecimal</strong>(java.lang.String x)</code></p><p></p><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
Methods Detail
</h2></td></tr></table><h2><a name="method_abs">abs</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType <strong>abs</strong>()</code></p><p>Absolutes the number stored</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code> - A XSDecimal representing the absolute value of the number stored</p><hr><h2><a name="method_ceiling">ceiling</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType <strong>ceiling</strong>()</code></p><p>Returns the smallest integer greater than the number stored</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code> - A XSDecimal representing the smallest integer greater than the number stored</p><hr><h2><a name="method_constructor">constructor</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>constructor</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Creates a new result sequence consisting of the retrievable decimal
number in the supplied result sequence</p><h3>Parameters</h3><p><code>arg</code> - The result sequence from which to extract the decimal number.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A new result sequence consisting of the decimal number supplied.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_convertArg">convertArg</a></h2><p><code>protected org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType <strong>convertArg</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg)</code></p><p></p><h3>Parameters</h3><p><code>arg</code></p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType</code></p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_div">div</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>div</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Mathematical division operator between this XSDecimal and the supplied
ResultSequence.</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence to perform a division with</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSDecimal consisting of the result of the mathematical division.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_double_value">double_value</a></h2><p><code>public double <strong>double_value</strong>()</code></p><p>Retrieves the actual value of the number stored</p><h3>Returns</h3><p><code>double</code> - The actual value of the number stored</p><hr><h2><a name="method_eq">eq</a></h2><p><code>public boolean <strong>eq</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType at
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Equality comparison between this number and the supplied representation.</p><h3>Parameters</h3><p><code>at</code> - Representation to be compared with (must currently be of type XSDecimal)</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if the 2 representation represent the same number. False otherwise</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_floor">floor</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType <strong>floor</strong>()</code></p><p>Returns the largest integer smaller than the number stored</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code> - A XSDecimal representing the largest integer smaller than the number stored</p><hr><h2><a name="method_getValue">getValue</a></h2><p><code>public java.math.BigDecimal <strong>getValue</strong>()</code></p><p></p><h3>Returns</h3><p><code>java.math.BigDecimal</code></p><hr><h2><a name="method_gt">gt</a></h2><p><code>public boolean <strong>gt</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Comparison between this number and the supplied representation.</p><h3>Parameters</h3><p><code>arg</code> - Representation to be compared with (must currently be of type XSDecimal)</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if the supplied type represents a number smaller than this one stored. False otherwise</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_idiv">idiv</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>idiv</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>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.</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence to perform an integer division with</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSInteger consisting of the result of the mathematical integer division.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_isLexicalValue">isLexicalValue</a></h2><p><code>protected boolean <strong>isLexicalValue</strong>(java.lang.String value)</code></p><p></p><h3>Parameters</h3><p><code>value</code></p><h3>Returns</h3><p><code>boolean</code></p><hr><h2><a name="method_lt">lt</a></h2><p><code>public boolean <strong>lt</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Comparison between this number and the supplied representation.</p><h3>Parameters</h3><p><code>arg</code> - Representation to be compared with (must currently be of type XSDecimal)</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if the supplied type represents a number greater than this one stored. False otherwise</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_minus">minus</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>minus</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Mathematical subtraction operator between this XSDecimal and the supplied
ResultSequence.</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence to perform a subtraction with</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSDecimal consisting of the result of the mathematical subtraction.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_mod">mod</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>mod</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>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.</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence to perform a modulus with</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSDecimal consisting of the result of the mathematical modulus.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_plus">plus</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>plus</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>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.</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence to perform an addition with</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSDecimal consisting of the result of the mathematical addition.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_round">round</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType <strong>round</strong>()</code></p><p>Returns the closest integer of the number stored.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code> - A XSDecimal representing the closest long of the number stored.</p><hr><h2><a name="method_round_half_to_even">round_half_to_even</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType <strong>round_half_to_even</strong>()</code></p><p>Returns the closest integer of the number stored.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code> - A XSDecimal representing the closest long of the number stored.</p><hr><h2><a name="method_round_half_to_even">round_half_to_even</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType <strong>round_half_to_even</strong>(int precision)</code></p><p>Returns the closest integer of the number stored with the specified precision.</p><h3>Parameters</h3><p><code>precision</code> - An integer precision</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType</code> - A XSDecimal representing the closest long of the number stored.</p><hr><h2><a name="method_set_double">set_double</a></h2><p><code>public void <strong>set_double</strong>(double x)</code></p><p>Sets the number stored to that supplied</p><h3>Parameters</h3><p><code>x</code> - Number to be stored</p><hr><h2><a name="method_string_type">string_type</a></h2><p><code>public java.lang.String <strong>string_type</strong>()</code></p><p>Retrieves the datatype's full pathname</p><h3>Returns</h3><p><code>java.lang.String</code> - "xs:decimal" which is the datatype's full pathname</p><hr><h2><a name="method_string_value">string_value</a></h2><p><code>public java.lang.String <strong>string_value</strong>()</code></p><p>Retrieves a String representation of the Decimal value stored</p><h3>Returns</h3><p><code>java.lang.String</code> - String representation of the Decimal value stored</p><hr><h2><a name="method_times">times</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>times</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Mathematical multiplication operator between this XSDecimal and the
supplied ResultSequence.</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence to perform a multiplication with</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSDecimal consisting of the result of the mathematical multiplication.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_type_name">type_name</a></h2><p><code>public java.lang.String <strong>type_name</strong>()</code></p><p>Retrieves the datatype's name</p><h3>Returns</h3><p><code>java.lang.String</code> - "decimal" which is the datatype's name</p><hr><h2><a name="method_unary_minus">unary_minus</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>unary_minus</strong>()</code></p><p>Negation of the number stored</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSDecimal representing the negation of this XSDecimal</p><hr><h2><a name="method_zero">zero</a></h2><p><code>public boolean <strong>zero</strong>()</code></p><p>Check if this XSDecimal represents 0</p><h3>Returns</h3><p><code>boolean</code> - True if this XSDecimal represents 0. False otherwise</p><hr></body></html>