Package org.eclipse.xtext.xbase.lib
Class BigIntegerExtensions
- java.lang.Object
-
- org.eclipse.xtext.xbase.lib.BigIntegerExtensions
-
@GwtCompatible public class BigIntegerExtensions extends java.lang.Object
This is an extension library forbig integral numbers
.
-
-
Constructor Summary
Constructors Constructor Description BigIntegerExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.math.BigInteger
operator_divide(java.math.BigInteger a, java.math.BigInteger b)
The binarydivide
operator.static java.math.BigInteger
operator_minus(java.math.BigInteger a)
The unaryminus
operator.static java.math.BigInteger
operator_minus(java.math.BigInteger a, java.math.BigInteger b)
The binaryminus
operator.static java.math.BigInteger
operator_modulo(java.math.BigInteger a, java.math.BigInteger b)
The binarymodulo
operator.static java.math.BigInteger
operator_multiply(java.math.BigInteger a, java.math.BigInteger b)
The binarytimes
operator.static java.math.BigInteger
operator_plus(java.math.BigInteger a, java.math.BigInteger b)
The binaryplus
operator.static java.math.BigInteger
operator_power(java.math.BigInteger a, int exponent)
Thepower
operator.
-
-
-
Method Detail
-
operator_minus
@Pure public static java.math.BigInteger operator_minus(java.math.BigInteger a)
The unaryminus
operator.- Parameters:
a
- a BigInteger. May not benull
.- Returns:
-a
- Throws:
java.lang.NullPointerException
- ifa
isnull
.
-
operator_plus
@Pure public static java.math.BigInteger operator_plus(java.math.BigInteger a, java.math.BigInteger b)
The binaryplus
operator.- Parameters:
a
- a BigInteger. May not benull
.b
- a BigInteger. May not benull
.- Returns:
a.add(b)
- Throws:
java.lang.NullPointerException
- ifa
orb
isnull
.
-
operator_minus
@Pure public static java.math.BigInteger operator_minus(java.math.BigInteger a, java.math.BigInteger b)
The binaryminus
operator.- Parameters:
a
- a BigInteger. May not benull
.b
- a BigInteger. May not benull
.- Returns:
a.subtract(b)
- Throws:
java.lang.NullPointerException
- ifa
orb
isnull
.
-
operator_power
@Pure public static java.math.BigInteger operator_power(java.math.BigInteger a, int exponent)
Thepower
operator.- Parameters:
a
- a BigInteger. May not benull
.exponent
- the exponent.- Returns:
a.pow(b)
- Throws:
java.lang.NullPointerException
- ifa
null
.
-
operator_multiply
@Pure public static java.math.BigInteger operator_multiply(java.math.BigInteger a, java.math.BigInteger b)
The binarytimes
operator.- Parameters:
a
- a BigInteger. May not benull
.b
- a BigInteger. May not benull
.- Returns:
a.multiply(b)
- Throws:
java.lang.NullPointerException
- ifa
orb
isnull
.
-
operator_divide
@Pure public static java.math.BigInteger operator_divide(java.math.BigInteger a, java.math.BigInteger b)
The binarydivide
operator.- Parameters:
a
- a BigInteger. May not benull
.b
- a BigInteger. May not benull
.- Returns:
a.divide(b)
- Throws:
java.lang.NullPointerException
- ifa
orb
isnull
.
-
operator_modulo
@Pure public static java.math.BigInteger operator_modulo(java.math.BigInteger a, java.math.BigInteger b)
The binarymodulo
operator.- Parameters:
a
- a BigInteger. May not benull
.b
- a BigInteger. May not benull
.- Returns:
a.mod(b)
- Throws:
java.lang.NullPointerException
- ifa
orb
isnull
.
-
-