Top Description Constructors Methods
org.apache.commons.compress.utils

public Class ExactMath

extends Object
Class Inheritance

PRIVATE. Performs exact math through Math "exact" APIs.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the addition of both values.
add
(final int
the first value, an int.
x
,
final long
the second value, a long,
y
)

Returns the int result of adding an int and a long, and throws an exception if the result overflows an int.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ExactMathback to summary
private ExactMath()

Method Detail

addback to summary
public static int add(final int x, final long y)

Returns the int result of adding an int and a long, and throws an exception if the result overflows an int.

Parameters
x:int

the first value, an int.

y:long

the second value, a long,

Returns:int

the addition of both values.

Exceptions
IllegalArgumentException:
when y or the result overflows an int