# Integer

<div class="jsdoc-content"><header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>
            <span class="ancestors"><a href="index.html">types</a>~</span>Integer<span class="signature">(bits, sign)</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>The internal representation of an integer is an array of 32-bit signed
pieces, along with a sign (0 or -1) that indicates the contents of all the
other 32-bit pieces out to infinity.  We use 32-bit pieces because these are
the size of integers on which Javascript performs bit-operations.  For
operations like addition and multiplication, we split each number into 16-bit
pieces, which can easily be multiplied within Javascript's floating-point
representation without overflow or change in sign.</p></div>
        
    
</header>


    
        

    
    </div>

## Constructor

<div class="jsdoc-content">
    

    
    <h4 class="name" id="Integer"><span class="type-signature"></span>new Integer<span class="signature">(bits, sign)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Constructs a two's-complement integer an array containing bits of the
integer in 32-bit (signed) pieces, given in little-endian order (i.e.,
lowest-order bits in the first piece), and the sign of -1 or 0.</p>
<p>See the from\* functions below for other convenient ways of constructing
Integers.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>bits</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Array containing the bits of the number.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sign</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The sign of the number: -1 for negative and 0 positive.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L18" target="_blank" rel="noopener">types/integer.ts, line 18</a></p></div>
<div class="admonition warning"><p class="admonition-title">Deprecated</p><p>Use either Long or builtin BigInt type instead of Integer.
This class will be remover at a later time.</p></div>




















    
    

    

    

    

    

    

    

    

    
        </div>

## Methods

<div class="jsdoc-content">

        
            

    

    
    <h4 class="name" id="abs"><span class="type-signature"></span>abs<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns a Integer whose value is the absolute value of this</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L710" target="_blank" rel="noopener">types/integer.ts, line 710</a></p></div>




















        
            

    

    
    <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the sum of this and the given Integer.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer to add to this.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L449" target="_blank" rel="noopener">types/integer.ts, line 449</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Integer result.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="and"><span class="type-signature"></span>and<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the bitwise-AND of this Integer and the given one.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer to AND with this.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L625" target="_blank" rel="noopener">types/integer.ts, line 625</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The bitwise-AND of this and the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="compare"><span class="type-signature"></span>compare<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Compares this Integer with the given one.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L407" target="_blank" rel="noopener">types/integer.ts, line 407</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>0 if they are the same, 1 if the this is greater, and -1
if the given one is greater.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="divide"><span class="type-signature"></span>divide<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns this Integer divided by the given one.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Th Integer to divide this by.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L546" target="_blank" rel="noopener">types/integer.ts, line 546</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>This value divided by the given one.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="equals"><span class="type-signature"></span>equals<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L354" target="_blank" rel="noopener">types/integer.ts, line 354</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this Integer equals the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="getBits"><span class="type-signature"></span>getBits<span class="signature">(index)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the index-th 32-bit (signed) piece of the Integer according to
little-endian order (i.e., index 0 contains the smallest bits).</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The index in question.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L306" target="_blank" rel="noopener">types/integer.ts, line 306</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The requested 32-bits as a signed number.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="getBitsUnsigned"><span class="type-signature"></span>getBitsUnsigned<span class="signature">(index)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the index-th 32-bit piece as an unsigned number.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The index in question.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L319" target="_blank" rel="noopener">types/integer.ts, line 319</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The requested 32-bits as an unsigned number.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="getSign"><span class="type-signature"></span>getSign<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L324" target="_blank" rel="noopener">types/integer.ts, line 324</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The sign bit of this number, -1 or 0.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="greaterThan"><span class="type-signature"></span>greaterThan<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L377" target="_blank" rel="noopener">types/integer.ts, line 377</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this Integer is greater than the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="greaterThanOrEqual"><span class="type-signature"></span>greaterThanOrEqual<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L384" target="_blank" rel="noopener">types/integer.ts, line 384</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this Integer is greater than or equal to the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="inspect"><span class="type-signature"></span>inspect<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Provide the name of the constructor and the string representation</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L704" target="_blank" rel="noopener">types/integer.ts, line 704</a></p></div>




















        
            

    

    
    <h4 class="name" id="isNegative"><span class="type-signature"></span>isNegative<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L340" target="_blank" rel="noopener">types/integer.ts, line 340</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this value is negative.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="isOdd"><span class="type-signature"></span>isOdd<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L344" target="_blank" rel="noopener">types/integer.ts, line 344</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this value is odd.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="isZero"><span class="type-signature"></span>isZero<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L328" target="_blank" rel="noopener">types/integer.ts, line 328</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this value is zero.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="lessThan"><span class="type-signature"></span>lessThan<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L391" target="_blank" rel="noopener">types/integer.ts, line 391</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this Integer is less than the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="lessThanOrEqual"><span class="type-signature"></span>lessThanOrEqual<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L398" target="_blank" rel="noopener">types/integer.ts, line 398</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this Integer is less than or equal to the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="modulo"><span class="type-signature"></span>modulo<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns this Integer modulo the given one.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer by which to mod.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L608" target="_blank" rel="noopener">types/integer.ts, line 608</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>This value modulo the given one.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="multiply"><span class="type-signature"></span>multiply<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the product of this and the given Integer.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer to multiply against this.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L483" target="_blank" rel="noopener">types/integer.ts, line 483</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The product of this and the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="negate"><span class="type-signature"></span>negate<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L441" target="_blank" rel="noopener">types/integer.ts, line 441</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The negation of this value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="not"><span class="type-signature"></span>not<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L612" target="_blank" rel="noopener">types/integer.ts, line 612</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The bitwise-NOT of this value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="notEquals"><span class="type-signature"></span>notEquals<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Integer to compare against.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L370" target="_blank" rel="noopener">types/integer.ts, line 370</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Whether this Integer does not equal the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="or"><span class="type-signature"></span>or<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the bitwise-OR of this Integer and the given one.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer to OR with this.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L638" target="_blank" rel="noopener">types/integer.ts, line 638</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The bitwise-OR of this and the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="shiftLeft"><span class="type-signature"></span>shiftLeft<span class="signature">(numBits)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns this value with bits shifted to the left by the given amount.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>numBits</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The number of bits by which to shift.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L664" target="_blank" rel="noopener">types/integer.ts, line 664</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>This shifted to the left by the given amount.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="shiftRight"><span class="type-signature"></span>shiftRight<span class="signature">(numBits)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns this value with bits shifted to the right by the given amount.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>numBits</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The number of bits by which to shift.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L685" target="_blank" rel="noopener">types/integer.ts, line 685</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>This shifted to the right by the given amount.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="shorten"><span class="type-signature"></span>shorten<span class="signature">(numBits)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns an integer with only the first numBits bits of this value, sign
extended from the final bit.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>numBits</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The number of bits by which to shift.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L422" target="_blank" rel="noopener">types/integer.ts, line 422</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The shorted integer value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="subtract"><span class="type-signature"></span>subtract<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the difference of this and the given Integer.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer to subtract from this.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L475" target="_blank" rel="noopener">types/integer.ts, line 475</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The Integer result.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="toInt"><span class="type-signature"></span>toInt<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the value, assuming it is a 32-bit integer.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L246" target="_blank" rel="noopener">types/integer.ts, line 246</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The corresponding int value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the string representation.
Method used by the native JSON.stringify() to serialize this instance.</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L717" target="_blank" rel="noopener">types/integer.ts, line 717</a></p></div>




















        
            

    

    
    <h4 class="name" id="toNumber"><span class="type-signature"></span>toNumber<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L250" target="_blank" rel="noopener">types/integer.ts, line 250</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The closest floating-point representation to this value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">(optRadix)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>optRadix</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The radix in which the text should be written.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L267" target="_blank" rel="noopener">types/integer.ts, line 267</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The textual representation of this value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id="xor"><span class="type-signature"></span>xor<span class="signature">(other)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns the bitwise-XOR of this Integer and the given one.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>other</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The Integer to XOR with this.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L651" target="_blank" rel="noopener">types/integer.ts, line 651</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The bitwise-XOR of this and the other.</p>
</div>



    





        
            

    

    
    <h4 class="name" id=".fromBits"><span class="type-signature">(static) </span>fromBits<span class="signature">(bits)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns a Integer representing the value that comes by concatenating the
given entries, each is assumed to be 32 signed bits, given in little-endian
order (lowest order bits in the lowest index), and sign-extending the highest
order 32-bit value.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>bits</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The bits of the number, in 32-bit signed pieces,
in little-endian order.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L95" target="_blank" rel="noopener">types/integer.ts, line 95</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The corresponding Integer value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id=".fromBuffer"><span class="type-signature">(static) </span>fromBuffer<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns an Integer representation of a given big endian Buffer.
The internal representation of bits contains bytes in groups of 4</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L145" target="_blank" rel="noopener">types/integer.ts, line 145</a></p></div>




















        
            

    

    
    <h4 class="name" id=".fromInt"><span class="type-signature">(static) </span>fromInt<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns an Integer representing the given (32-bit) integer value.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>A 32-bit integer value.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L52" target="_blank" rel="noopener">types/integer.ts, line 52</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The corresponding Integer value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id=".fromNumber"><span class="type-signature">(static) </span>fromNumber<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns an Integer representing the given value, provided that it is a finite
number.  Otherwise, zero is returned.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The value in question.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L72" target="_blank" rel="noopener">types/integer.ts, line 72</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The corresponding Integer value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id=".fromString"><span class="type-signature">(static) </span>fromString<span class="signature">(str, optRadix)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns an Integer representation of the given string, written using the
given radix.</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params docutils align-default">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The textual representation of the Integer.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>optRadix</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>The radix in which the text is written.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L107" target="_blank" rel="noopener">types/integer.ts, line 107</a></p></div>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The corresponding Integer value.</p>
</div>



    





        
            

    

    
    <h4 class="name" id=".toBuffer"><span class="type-signature">(static) </span>toBuffer<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>Returns a big endian buffer representation of an Integer.
Internally the bits are represented using 4 bytes groups (numbers),
in the Buffer representation there might be the case where we need less than the 4 bytes.
For example: 0x00000001 -&gt; '01', 0xFFFFFFFF -&gt; 'FF', 0xFFFFFF01 -&gt; 'FF01'</p>
</div>













<div class="admonition note"><p class="admonition-title">Source</p><p><a href="https://github.com/scylladb/nodejs-rs-driver/blob/v0.7.1/lib/types/integer.ts#L181" target="_blank" rel="noopener">types/integer.ts, line 181</a></p></div></div>
