<!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 (version 1.7.0_51) on Wed Sep 16 15:55:13 PDT 2015 -->
<title>Decimal</title>
<meta name="date" content="2015-09-16">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Decimal";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</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="../../../../../org/apache/spark/sql/types/DateType.html" title="class in org.apache.spark.sql.types"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/spark/sql/types/DecimalType.html" title="class in org.apache.spark.sql.types"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/sql/types/Decimal.html" target="_top">Frames</a></li>
<li><a href="Decimal.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>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.spark.sql.types</div>
<h2 title="Class Decimal" class="title">Class Decimal</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.spark.sql.types.Decimal</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, java.lang.Comparable<<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a>>, scala.math.Ordered<<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a>></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="strong">Decimal</span>
extends java.lang.Object
implements scala.math.Ordered<<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a>>, scala.Serializable</pre>
<div class="block">A mutable implementation of BigDecimal that can hold a Long if values are small enough.
<p>
The semantics of the fields are as follows:
- _precision and _scale represent the SQL precision and scale we are looking for
- If decimalVal is set, it represents the whole decimal value
- Otherwise, the decimal value is longVal / (10 ** _scale)</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.sql.types.Decimal">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#Decimal()">Decimal</a></strong>()</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#abs()">abs</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(scala.math.BigDecimal)">apply</a></strong>(scala.math.BigDecimal value)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(java.math.BigDecimal)">apply</a></strong>(java.math.BigDecimal value)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(scala.math.BigDecimal, int, int)">apply</a></strong>(scala.math.BigDecimal value,
int precision,
int scale)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(java.math.BigDecimal, int, int)">apply</a></strong>(java.math.BigDecimal value,
int precision,
int scale)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(double)">apply</a></strong>(double value)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(int)">apply</a></strong>(int value)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(long)">apply</a></strong>(long value)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(long, int, int)">apply</a></strong>(long unscaled,
int precision,
int scale)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#apply(java.lang.String)">apply</a></strong>(java.lang.String value)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#changePrecision(int, int)">changePrecision</a></strong>(int precision,
int scale)</code>
<div class="block">Update precision and scale while keeping our value the same, and return true if successful.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#clone()">clone</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#compare(org.apache.spark.sql.types.Decimal)">compare</a></strong>(<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> other)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object other)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#hashCode()">hashCode</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#isZero()">isZero</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#MAX_LONG_DIGITS()">MAX_LONG_DIGITS</a></strong>()</code>
<div class="block">Maximum number of decimal digits a Long can represent</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#ONE()">ONE</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#precision()">precision</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#remainder(org.apache.spark.sql.types.Decimal)">remainder</a></strong>(<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> that)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#scale()">scale</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#set(scala.math.BigDecimal)">set</a></strong>(scala.math.BigDecimal decimal)</code>
<div class="block">Set this Decimal to the given BigDecimal value, inheriting its precision and scale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#set(scala.math.BigDecimal, int, int)">set</a></strong>(scala.math.BigDecimal decimal,
int precision,
int scale)</code>
<div class="block">Set this Decimal to the given BigDecimal value, with a given precision and scale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#set(org.apache.spark.sql.types.Decimal)">set</a></strong>(<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> decimal)</code>
<div class="block">Set this Decimal to the given Decimal value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#set(int)">set</a></strong>(int intVal)</code>
<div class="block">Set this Decimal to the given Int.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#set(long)">set</a></strong>(long longVal)</code>
<div class="block">Set this Decimal to the given Long.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#set(long, int, int)">set</a></strong>(long unscaled,
int precision,
int scale)</code>
<div class="block">Set this Decimal to the given unscaled Long, with a given precision and scale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#setOrNull(long, int, int)">setOrNull</a></strong>(long unscaled,
int precision,
int scale)</code>
<div class="block">Set this Decimal to the given unscaled Long, with a given precision and scale,
and return it, or return null if it cannot be set due to overflow.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>scala.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toBigDecimal()">toBigDecimal</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toByte()">toByte</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toDebugString()">toDebugString</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toDouble()">toDouble</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toFloat()">toFloat</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toInt()">toInt</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toJavaBigDecimal()">toJavaBigDecimal</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toLong()">toLong</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toShort()">toShort</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toString()">toString</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#toUnscaledLong()">toUnscaledLong</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/sql/types/Decimal.html#ZERO()">ZERO</a></strong>()</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_scala.math.Ordered">
<!-- -->
</a>
<h3>Methods inherited from interface scala.math.Ordered</h3>
<code>$greater, $greater$eq, $less, $less$eq, compareTo</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Decimal()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Decimal</h4>
<pre>public Decimal()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="MAX_LONG_DIGITS()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_LONG_DIGITS</h4>
<pre>public static int MAX_LONG_DIGITS()</pre>
<div class="block">Maximum number of decimal digits a Long can represent</div>
</li>
</ul>
<a name="ZERO()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ZERO</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> ZERO()</pre>
</li>
</ul>
<a name="ONE()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ONE</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> ONE()</pre>
</li>
</ul>
<a name="apply(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(double value)</pre>
</li>
</ul>
<a name="apply(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(long value)</pre>
</li>
</ul>
<a name="apply(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(int value)</pre>
</li>
</ul>
<a name="apply(scala.math.BigDecimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(scala.math.BigDecimal value)</pre>
</li>
</ul>
<a name="apply(java.math.BigDecimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(java.math.BigDecimal value)</pre>
</li>
</ul>
<a name="apply(scala.math.BigDecimal, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(scala.math.BigDecimal value,
int precision,
int scale)</pre>
</li>
</ul>
<a name="apply(java.math.BigDecimal, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(java.math.BigDecimal value,
int precision,
int scale)</pre>
</li>
</ul>
<a name="apply(long, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(long unscaled,
int precision,
int scale)</pre>
</li>
</ul>
<a name="apply(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public static <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> apply(java.lang.String value)</pre>
</li>
</ul>
<a name="precision()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>precision</h4>
<pre>public int precision()</pre>
</li>
</ul>
<a name="scale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scale</h4>
<pre>public int scale()</pre>
</li>
</ul>
<a name="set(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> set(long longVal)</pre>
<div class="block">Set this Decimal to the given Long. Will have precision 20 and scale 0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>longVal</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="set(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> set(int intVal)</pre>
<div class="block">Set this Decimal to the given Int. Will have precision 10 and scale 0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>intVal</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="set(long, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> set(long unscaled,
int precision,
int scale)</pre>
<div class="block">Set this Decimal to the given unscaled Long, with a given precision and scale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>unscaled</code> - (undocumented)</dd><dd><code>precision</code> - (undocumented)</dd><dd><code>scale</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setOrNull(long, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOrNull</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> setOrNull(long unscaled,
int precision,
int scale)</pre>
<div class="block">Set this Decimal to the given unscaled Long, with a given precision and scale,
and return it, or return null if it cannot be set due to overflow.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>unscaled</code> - (undocumented)</dd><dd><code>precision</code> - (undocumented)</dd><dd><code>scale</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="set(scala.math.BigDecimal, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> set(scala.math.BigDecimal decimal,
int precision,
int scale)</pre>
<div class="block">Set this Decimal to the given BigDecimal value, with a given precision and scale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>decimal</code> - (undocumented)</dd><dd><code>precision</code> - (undocumented)</dd><dd><code>scale</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="set(scala.math.BigDecimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> set(scala.math.BigDecimal decimal)</pre>
<div class="block">Set this Decimal to the given BigDecimal value, inheriting its precision and scale.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>decimal</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="set(org.apache.spark.sql.types.Decimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> set(<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> decimal)</pre>
<div class="block">Set this Decimal to the given Decimal value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>decimal</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="toBigDecimal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBigDecimal</h4>
<pre>public scala.math.BigDecimal toBigDecimal()</pre>
</li>
</ul>
<a name="toJavaBigDecimal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toJavaBigDecimal</h4>
<pre>public java.math.BigDecimal toJavaBigDecimal()</pre>
</li>
</ul>
<a name="toUnscaledLong()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toUnscaledLong</h4>
<pre>public long toUnscaledLong()</pre>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toDebugString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDebugString</h4>
<pre>public java.lang.String toDebugString()</pre>
</li>
</ul>
<a name="toDouble()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDouble</h4>
<pre>public double toDouble()</pre>
</li>
</ul>
<a name="toFloat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toFloat</h4>
<pre>public float toFloat()</pre>
</li>
</ul>
<a name="toLong()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public long toLong()</pre>
</li>
</ul>
<a name="toInt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public int toInt()</pre>
</li>
</ul>
<a name="toShort()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public short toShort()</pre>
</li>
</ul>
<a name="toByte()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByte</h4>
<pre>public byte toByte()</pre>
</li>
</ul>
<a name="changePrecision(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>changePrecision</h4>
<pre>public boolean changePrecision(int precision,
int scale)</pre>
<div class="block">Update precision and scale while keeping our value the same, and return true if successful.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>precision</code> - (undocumented)</dd><dd><code>scale</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if successful, false if overflow would occur</dd></dl>
</li>
</ul>
<a name="clone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> clone()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>clone</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="compare(org.apache.spark.sql.types.Decimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compare</h4>
<pre>public int compare(<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> other)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>compare</code> in interface <code>scala.math.Ordered<<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a>></code></dd>
</dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(java.lang.Object other)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="isZero()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isZero</h4>
<pre>public boolean isZero()</pre>
</li>
</ul>
<a name="remainder(org.apache.spark.sql.types.Decimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remainder</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> remainder(<a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> that)</pre>
</li>
</ul>
<a name="abs()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>abs</h4>
<pre>public <a href="../../../../../org/apache/spark/sql/types/Decimal.html" title="class in org.apache.spark.sql.types">Decimal</a> abs()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</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="../../../../../org/apache/spark/sql/types/DateType.html" title="class in org.apache.spark.sql.types"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/spark/sql/types/DecimalType.html" title="class in org.apache.spark.sql.types"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/sql/types/Decimal.html" target="_top">Frames</a></li>
<li><a href="Decimal.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>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<script defer="defer" type="text/javascript" src="../../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../../lib/api-javadocs.js"></script></body>
</html>