Top Description Constructors Methods
org.eclipse.xtext.xbase.lib

public Class BigIntegerExtensions

extends Object
Class Inheritance
Annotations
@GwtCompatible
Imports
java.math.BigInteger, com.google.common.annotations.GwtCompatible

This is an extension library for big integral numbers.
Author
Jan Koehnlein - Initial contribution and API

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static BigInteger

Returns:

a.divide(b)
operator_divide
(BigInteger
a BigInteger. May not be null.
a
,
BigInteger
a BigInteger. May not be null.
b
)

The binary divide operator.

public static BigInteger

Returns:

-a
operator_minus
(BigInteger
a BigInteger. May not be null.
a
)

The unary minus operator.

public static BigInteger

Returns:

a.subtract(b)
operator_minus
(BigInteger
a BigInteger. May not be null.
a
,
BigInteger
a BigInteger. May not be null.
b
)

The binary minus operator.

public static BigInteger

Returns:

a.mod(b)
operator_modulo
(BigInteger
a BigInteger. May not be null.
a
,
BigInteger
a BigInteger. May not be null.
b
)

The binary modulo operator.

public static BigInteger

Returns:

a.multiply(b)
operator_multiply
(BigInteger
a BigInteger. May not be null.
a
,
BigInteger
a BigInteger. May not be null.
b
)

The binary times operator.

public static BigInteger

Returns:

a.add(b)
operator_plus
(BigInteger
a BigInteger. May not be null.
a
,
BigInteger
a BigInteger. May not be null.
b
)

The binary plus operator.

public static BigInteger

Returns:

a.pow(b)
operator_power
(BigInteger
a BigInteger. May not be null.
a
,
int
the exponent.
exponent
)

The power operator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BigIntegerExtensionsback to summary
public BigIntegerExtensions()

Method Detail

operator_divideback to summary
public static BigInteger operator_divide(BigInteger a, BigInteger b)

The binary divide operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

b:BigInteger

a BigInteger. May not be null.

Returns:BigInteger

a.divide(b)

Annotations
@Inline:$1.divide($2)
@Pure
Exceptions
NullPointerException:
if a or b is null.
operator_minusback to summary
public static BigInteger operator_minus(BigInteger a)

The unary minus operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

Returns:BigInteger

-a

Annotations
@Inline:$1.negate()
@Pure
Exceptions
NullPointerException:
if a is null.
operator_minusback to summary
public static BigInteger operator_minus(BigInteger a, BigInteger b)

The binary minus operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

b:BigInteger

a BigInteger. May not be null.

Returns:BigInteger

a.subtract(b)

Annotations
@Inline:$1.subtract($2)
@Pure
Exceptions
NullPointerException:
if a or b is null.
operator_moduloback to summary
public static BigInteger operator_modulo(BigInteger a, BigInteger b)

The binary modulo operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

b:BigInteger

a BigInteger. May not be null.

Returns:BigInteger

a.mod(b)

Annotations
@Inline:$1.mod($2)
@Pure
Exceptions
NullPointerException:
if a or b is null.
operator_multiplyback to summary
public static BigInteger operator_multiply(BigInteger a, BigInteger b)

The binary times operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

b:BigInteger

a BigInteger. May not be null.

Returns:BigInteger

a.multiply(b)

Annotations
@Inline:$1.multiply($2)
@Pure
Exceptions
NullPointerException:
if a or b is null.
operator_plusback to summary
public static BigInteger operator_plus(BigInteger a, BigInteger b)

The binary plus operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

b:BigInteger

a BigInteger. May not be null.

Returns:BigInteger

a.add(b)

Annotations
@Inline:$1.add($2)
@Pure
Exceptions
NullPointerException:
if a or b is null.
operator_powerback to summary
public static BigInteger operator_power(BigInteger a, int exponent)

The power operator.

Parameters
a:BigInteger

a BigInteger. May not be null.

exponent:int

the exponent.

Returns:BigInteger

a.pow(b)

Annotations
@Inline:$1.pow($2)
@Pure
Exceptions
NullPointerException:
if a null.