|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Math
@TransactionType(value=NOT_SUPPORTED) public final class Math
The class Math contains methods for performing basic numeric
operations.
| Method Summary | |
|---|---|
static int |
abs(int a)
Returns the absolute value of an int value. |
static long |
abs(long a)
Returns the absolute value of a long value. |
static int |
max(int a,
int b)
Returns the greater of two int values. |
static long |
max(long a,
long b)
Returns the greater of two long values. |
static int |
min(int a,
int b)
Returns the smaller of two int values. |
static long |
min(long a,
long b)
Returns the smaller of two long values. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int abs(int a)
int value. If the
argument is not negative, the argument is returned. If the argument is
negative, the negation of the argument is returned.
Note that if the argument is equal to the value of
Integer.MIN_VALUE, the most negative representable
int value, the result is that same value, which is
negative.
a - an int value.
Integer.MIN_VALUEpublic static long abs(long a)
long value. If the
argument is not negative, the argument is returned. If the argument is
negative, the negation of the argument is returned.
Note that if the argument is equal to the value of
Long.MIN_VALUE, the most negative representable
long value, the result is that same value, which is
negative.
a - a long value.
Long.MIN_VALUE
public static int max(int a,
int b)
int values. That is, the result
is the argument closer to the value of Integer.MAX_VALUE.
If the arguments have the same value, the result is that same value.
a - an int value.b - an int value.
a and b.Long.MAX_VALUE
public static long max(long a,
long b)
long values. That is, the
result is the argument closer to the value of Long.MAX_VALUE.
If the arguments have the same value, the result is that same value.
a - a long value.b - a long value.
a and b.Long.MAX_VALUE
public static int min(int a,
int b)
int values. That is, the result
the argument closer to the value of Integer.MIN_VALUE. If
the arguments have the same value, the result is that same value.
a - an int value.b - an int value.
a and b.Long.MIN_VALUE
public static long min(long a,
long b)
long values. That is, the
result is the argument closer to the value of Long.MIN_VALUE.
If the arguments have the same value, the result is that same value.
a - a long value.b - a long value.
a and b.Long.MIN_VALUE
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||