dw.util
Class BigInteger
Object
dw.util.BigInteger
The Integer class is a helper class to represent an arbitrary long integer number. The Demandware framework doesn't use this class, but in some special cases web services that declare a XML element with "xsd:integer", which is by definition an arbitrary long integer number, require the use of this class. The class is designed in a way that it can be used very similar to a desktop calculator. For example: var i = new Integer( 10 ); var result = d.add( 2 ).sub( 3 ).get(); The above code will return 9 as result.
API Versioned:
No longer available as of version 22.7.
Deprecated:
Replaced by BigInt.
Constructor Summary
BigInteger()
Constructs a new Integer with the value 0.
BigInteger(value : Number)
Constructs a new Integer using the specified Number value.
BigInteger(value : String)
Constructs a new Integer using the specified string representation of a number.
Method Summary
abs() : BigInteger
Returns a new Integer with the absolute value of this Integer.
add(value : Number) : BigInteger
Adds a Number value to this Integer and returns the new Integer.
add(value : BigInteger) : BigInteger
Adds an Integer value to this Integer and returns the new Integer.
divide(value : Number) : BigInteger
Divides this Integer by the specified Integer and returns the new Integer.
divide(value : BigInteger) : BigInteger
Divides this Integer by the specified Integer and returns the new Integer.
equals(other : Object) : boolean
Compares two Integer values whether they are equivalent.
get() : Number
Returns the value of the Integer as a Number.
hashCode() : Number
Calculates the hash code for this Integer;
multiply(value : Number) : BigInteger
Multiples the specified Number value with this Integer and returns the new Integer.
multiply(value : BigInteger) : BigInteger
Multiples the specified Integer value with this Integer and returns the new Integer.
negate() : BigInteger
Returns a new Integer with the negated value of this Integer.
subtract(value : Number) : BigInteger
Subtracts the specified Number value from this Integer and returns the new Integer.
subtract(value : BigInteger) : BigInteger
Subtracts the specified Integer value from this Integer and returns the new Integer.
toString() : String
Returns a string representation of this object.
valueOf() : Object
The valueOf() method is called by the ECMAScript interpret to return the "natural" value of an object.
Constructor Detail
BigInteger
public BigInteger()
Constructs a new Integer with the value 0.

BigInteger
public BigInteger(value : Number)
Constructs a new Integer using the specified Number value.
Parameters:
value - the value to use.

BigInteger
public BigInteger(value : String)
Constructs a new Integer using the specified string representation of a number.
Parameters:
value - the value to use.

Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
abs
abs() : BigInteger
Returns a new Integer with the absolute value of this Integer.
Returns:
the new Integer

add
add(value : Number) : BigInteger
Adds a Number value to this Integer and returns the new Integer.
Parameters:
value - the value to add to this Integer.
Returns:
the new Integer with the value added.

add
add(value : BigInteger) : BigInteger
Adds an Integer value to this Integer and returns the new Integer.
Parameters:
value - the value to add to this Integer.
Returns:
the new Integer with the value added.

divide
divide(value : Number) : BigInteger
Divides this Integer by the specified Integer and returns the new Integer.
Parameters:
value - the value to use to divide this Integer.
Returns:
the new Integer.

divide
divide(value : BigInteger) : BigInteger
Divides this Integer by the specified Integer and returns the new Integer.
Parameters:
value - the value to use to divide this Integer.
Returns:
the new Integer.

equals
equals(other : Object) : boolean
Compares two Integer values whether they are equivalent.
Parameters:
other - the object to compare against this Integer.

get
get() : Number
Returns the value of the Integer as a Number.
Returns:
the value of the Integer.

hashCode
hashCode() : Number
Calculates the hash code for this Integer;

multiply
multiply(value : Number) : BigInteger
Multiples the specified Number value with this Integer and returns the new Integer.
Parameters:
value - the value to multiply with this Integer.
Returns:
the new Integer.

multiply
multiply(value : BigInteger) : BigInteger
Multiples the specified Integer value with this Integer and returns the new Integer.
Parameters:
value - the value to multiply with this Integer.
Returns:
the new Integer.

negate
negate() : BigInteger
Returns a new Integer with the negated value of this Integer.
Returns:
the new Integer

subtract
subtract(value : Number) : BigInteger
Subtracts the specified Number value from this Integer and returns the new Integer.
Parameters:
value - the value to add to this Integer.
Returns:
the new Integer with the value subtraced.

subtract
subtract(value : BigInteger) : BigInteger
Subtracts the specified Integer value from this Integer and returns the new Integer.
Parameters:
value - the value to add to this Integer.
Returns:
the new Integer with the value subtraced.

toString
toString() : String
Returns a string representation of this object.
Returns:
a string representation of this object.

valueOf
valueOf() : Object
The valueOf() method is called by the ECMAScript interpret to return the "natural" value of an object. The Inetger object returns its current value as number. With this behavior script snippets can be written like: var i = new Integer( 10 ); var x = 1 + d.add( 2 ); where x will be at the end 13.
Returns:
the value of this object.

β™₯
Notifications pending to read