java.lang.Object
org.eclipse.xtext.xbase.lib.BigIntegerExtensions
This is an extension library for
big integral numbers.- Author:
- Jan Koehnlein - Initial contribution and API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BigIntegerThe binarydivideoperator.static BigIntegerThe unaryminusoperator.static BigIntegerThe binaryminusoperator.static BigIntegerThe binarymodulooperator.static BigIntegerThe binarytimesoperator.static BigIntegerThe binaryplusoperator.static BigIntegeroperator_power(BigInteger a, int exponent) Thepoweroperator.
-
Constructor Details
-
BigIntegerExtensions
public BigIntegerExtensions()
-
-
Method Details
-
operator_minus
The unaryminusoperator.- Parameters:
a- a BigInteger. May not benull.- Returns:
-a- Throws:
NullPointerException- ifaisnull.
-
operator_plus
The binaryplusoperator.- Parameters:
a- a BigInteger. May not benull.b- a BigInteger. May not benull.- Returns:
a.add(b)- Throws:
NullPointerException- ifaorbisnull.
-
operator_minus
The binaryminusoperator.- Parameters:
a- a BigInteger. May not benull.b- a BigInteger. May not benull.- Returns:
a.subtract(b)- Throws:
NullPointerException- ifaorbisnull.
-
operator_power
Thepoweroperator.- Parameters:
a- a BigInteger. May not benull.exponent- the exponent.- Returns:
a.pow(b)- Throws:
NullPointerException- ifanull.
-
operator_multiply
The binarytimesoperator.- Parameters:
a- a BigInteger. May not benull.b- a BigInteger. May not benull.- Returns:
a.multiply(b)- Throws:
NullPointerException- ifaorbisnull.
-
operator_divide
The binarydivideoperator.- Parameters:
a- a BigInteger. May not benull.b- a BigInteger. May not benull.- Returns:
a.divide(b)- Throws:
NullPointerException- ifaorbisnull.
-
operator_modulo
The binarymodulooperator.- Parameters:
a- a BigInteger. May not benull.b- a BigInteger. May not benull.- Returns:
a.mod(b)- Throws:
NullPointerException- ifaorbisnull.
-