| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (9.0.1) on Fri Dec 28 04:30:56 EST 2018 --> |
| <title>JsonNumber (JSR 374 (JSON Processing) Default Provider 1.1.5 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="date" content="2018-12-28"> |
| <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../script.js"></script> |
| <script type="text/javascript" src="../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../jquery/jquery-1.10.2.js"></script> |
| <script type="text/javascript" src="../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="JsonNumber (JSR 374 (JSON Processing) Default Provider 1.1.5 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":18,"i12":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../";loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../overview-summary.html">Overview</a></li> |
| <li><a href="../../java.json-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/JsonNumber.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../index-all.html">Index</a></li> |
| <li><a href="../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../javax/json/JsonMergePatch.html" title="interface in javax.json"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/json/JsonObject.html" title="interface in javax.json"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/json/JsonNumber.html" target="_top">Frames</a></li> |
| <li><a href="JsonNumber.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><span>SEARCH: </span> |
| <input type="text" id="search" value=" " disabled="disabled"> |
| <input type="reset" id="reset" value=" " disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../java.json-summary.html">java.json</a></div> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="../../javax/json/package-summary.html">javax.json</a></div> |
| <h2 title="Interface JsonNumber" class="title">Interface JsonNumber</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><code><a href="../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></code></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">JsonNumber</span> |
| extends <a href="../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></pre> |
| <div class="block">An immutable JSON number value. |
| |
| <p> |
| Implementations may use a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> object to store the numeric |
| value internally. |
| The <code>BigDecimal</code> object can be constructed from the following types: |
| <code>int</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#BigDecimal-int-" title="class or interface in java.math"><code>BigDecimal(int)</code></a>, |
| <code>long</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#BigDecimal-long-" title="class or interface in java.math"><code>BigDecimal(long)</code></a>, |
| <code>BigInteger</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#BigDecimal-java.math.BigInteger-" title="class or interface in java.math"><code>BigDecimal(BigInteger)</code></a>, |
| <code>double</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#valueOf-double-" title="class or interface in java.math"><code>BigDecimal.valueOf(double)</code></a>, and |
| <code>String</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#BigDecimal-java.lang.String-" title="class or interface in java.math"><code>BigDecimal(String)</code></a>. |
| Some of the method semantics in this class are defined using the |
| <code>BigDecimal</code> semantics.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.javax.json.JsonValue"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface javax.json.<a href="../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></h3> |
| <code><a href="../../javax/json/JsonValue.ValueType.html" title="enum in javax.json">JsonValue.ValueType</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.javax.json.JsonValue"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from interface javax.json.<a href="../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></h3> |
| <code><a href="../../javax/json/JsonValue.html#EMPTY_JSON_ARRAY">EMPTY_JSON_ARRAY</a>, <a href="../../javax/json/JsonValue.html#EMPTY_JSON_OBJECT">EMPTY_JSON_OBJECT</a>, <a href="../../javax/json/JsonValue.html#FALSE">FALSE</a>, <a href="../../javax/json/JsonValue.html#NULL">NULL</a>, <a href="../../javax/json/JsonValue.html#TRUE">TRUE</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#bigDecimalValue--">bigDecimalValue</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> object.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#bigIntegerValue--">bigIntegerValue</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> object.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#bigIntegerValueExact--">bigIntegerValueExact</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> object.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#doubleValue--">doubleValue</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <code>double</code>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#equals-java.lang.Object-">equals</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code></th> |
| <td class="colLast"> |
| <div class="block">Compares the specified object with this <code>JsonNumber</code> object for |
| equality.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#hashCode--">hashCode</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the hash code value for this <code>JsonNumber</code> object.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#intValue--">intValue</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as an <code>int</code>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#intValueExact--">intValueExact</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as an <code>int</code>.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#isIntegral--">isIntegral</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this JSON number is a integral number.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#longValue--">longValue</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <code>long</code>.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#longValueExact--">longValueExact</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <code>long</code>.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>default <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#numberValue--">numberValue</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang"><code>Number</code></a> object.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javax/json/JsonNumber.html#toString--">toString</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a JSON text representation of the JSON number.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.javax.json.JsonValue"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface javax.json.<a href="../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></h3> |
| <code><a href="../../javax/json/JsonValue.html#asJsonArray--">asJsonArray</a>, <a href="../../javax/json/JsonValue.html#asJsonObject--">asJsonObject</a>, <a href="../../javax/json/JsonValue.html#getValueType--">getValueType</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="isIntegral--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isIntegral</h4> |
| <pre>boolean isIntegral​()</pre> |
| <div class="block">Returns true if this JSON number is a integral number. This method |
| semantics are defined using <code>bigDecimalValue().scale()</code>. If the |
| scale is zero, then it is considered integral type. This integral type |
| information can be used to invoke an appropriate accessor method to |
| obtain a numeric value as in the following example: |
| |
| <pre> |
| <code> |
| JsonNumber num = ... |
| if (num.isIntegral()) { |
| num.longValue(); // or other methods to get integral value |
| } else { |
| num.doubleValue(); // or other methods to get decimal number value |
| } |
| </code> |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this number is a integral number, otherwise false</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="intValue--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intValue</h4> |
| <pre>int intValue​()</pre> |
| <div class="block">Returns this JSON number as an <code>int</code>. Note that this conversion |
| can lose information about the overall magnitude and precision of the |
| number value as well as return a result with the opposite sign.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an <code>int</code> representation of the JSON number</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#intValue--" title="class or interface in java.math"><code>BigDecimal.intValue()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="intValueExact--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intValueExact</h4> |
| <pre>int intValueExact​()</pre> |
| <div class="block">Returns this JSON number as an <code>int</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an <code>int</code> representation of the JSON number</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the number has a nonzero fractional |
| part or if it does not fit in an <code>int</code></dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#intValueExact--" title="class or interface in java.math"><code>BigDecimal.intValueExact()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="longValue--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longValue</h4> |
| <pre>long longValue​()</pre> |
| <div class="block">Returns this JSON number as a <code>long</code>. Note that this conversion |
| can lose information about the overall magnitude and precision of the |
| number value as well as return a result with the opposite sign.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>long</code> representation of the JSON number.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#longValue--" title="class or interface in java.math"><code>BigDecimal.longValue()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="longValueExact--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longValueExact</h4> |
| <pre>long longValueExact​()</pre> |
| <div class="block">Returns this JSON number as a <code>long</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>long</code> representation of the JSON number</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the number has a non-zero fractional |
| part or if it does not fit in a <code>long</code></dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#longValueExact--" title="class or interface in java.math"><code>BigDecimal.longValueExact()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bigIntegerValue--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigIntegerValue</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bigIntegerValue​()</pre> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> object. This is a |
| a convenience method for <code>bigDecimalValue().toBigInteger()</code>. |
| Note that this conversion can lose information about the overall |
| magnitude and precision of the number value as well as return a result |
| with the opposite sign.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>BigInteger</code> representation of the JSON number.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#toBigInteger--" title="class or interface in java.math"><code>BigDecimal.toBigInteger()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bigIntegerValueExact--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigIntegerValueExact</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bigIntegerValueExact​()</pre> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> object. This is a |
| convenience method for <code>bigDecimalValue().toBigIntegerExact()</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> representation of the JSON number</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the number has a nonzero fractional part</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#toBigIntegerExact--" title="class or interface in java.math"><code>BigDecimal.toBigIntegerExact()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="doubleValue--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doubleValue</h4> |
| <pre>double doubleValue​()</pre> |
| <div class="block">Returns this JSON number as a <code>double</code>. This is a |
| a convenience method for <code>bigDecimalValue().doubleValue()</code>. |
| Note that this conversion can lose information about the overall |
| magnitude and precision of the number value as well as return a result |
| with the opposite sign.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>double</code> representation of the JSON number</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#doubleValue--" title="class or interface in java.math"><code>BigDecimal.doubleValue()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="bigDecimalValue--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigDecimalValue</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a> bigDecimalValue​()</pre> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> object.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> representation of the JSON number</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="numberValue--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>numberValue</h4> |
| <pre>default <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a> numberValue​()</pre> |
| <div class="block">Returns this JSON number as a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang"><code>Number</code></a> object.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang"><code>Number</code></a> representation of the JSON number</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString​()</pre> |
| <div class="block">Returns a JSON text representation of the JSON number. The |
| representation is equivalent to <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#toString--" title="class or interface in java.math"><code>BigDecimal.toString()</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../javax/json/JsonValue.html#toString--">toString</a></code> in interface <code><a href="../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>JSON text representation of the number</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equals-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>boolean equals​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</pre> |
| <div class="block">Compares the specified object with this <code>JsonNumber</code> object for |
| equality. Returns <code>true</code> if and only if the type of the specified |
| object is also <code>JsonNumber</code> and their <a href="../../javax/json/JsonNumber.html#bigDecimalValue--"><code>bigDecimalValue()</code></a> |
| objects are <i>equal</i></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>obj</code> - the object to be compared for equality with |
| this <code>JsonNumber</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the specified object is equal to this |
| <code>JsonNumber</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hashCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>int hashCode​()</pre> |
| <div class="block">Returns the hash code value for this <code>JsonNumber</code> object. The |
| hash code of a <code>JsonNumber</code> object is defined as the hash code of |
| its <a href="../../javax/json/JsonNumber.html#bigDecimalValue--"><code>bigDecimalValue()</code></a> object.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the hash code value for this <code>JsonNumber</code> object</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../overview-summary.html">Overview</a></li> |
| <li><a href="../../java.json-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/JsonNumber.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../index-all.html">Index</a></li> |
| <li><a href="../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../javax/json/JsonMergePatch.html" title="interface in javax.json"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../javax/json/JsonObject.html" title="interface in javax.json"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/json/JsonNumber.html" target="_top">Frames</a></li> |
| <li><a href="JsonNumber.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2012-2018, <a href="http://www.oracle.com">Oracle</a> and/or its affiliates. All Rights Reserved. Use is subject to <a href="../../doc-files/speclicense.html" target="_top">license terms</a>. <br>Comments to : jsonp-dev@eclipse.org</small></p> |
| </body> |
| </html> |