|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Number
org.jscience.mathematics.algebraic.numbers.ComparableNumber<Long>
org.jscience.mathematics.algebraic.numbers.Long
public final class Long
The Long class encapsulates 64 bits integer numbers.
IntegerRing,
Serialized Form| Field Summary | |
|---|---|
static long |
MAX_VALUE
DOCUMENT ME! |
static long |
MIN_VALUE
DOCUMENT ME! |
static long |
NEGATIVE_INFINITY
DOCUMENT ME! |
static Long |
ONE
DOCUMENT ME! |
static long |
POSITIVE_INFINITY
DOCUMENT ME! |
static java.lang.Class |
TYPE
DOCUMENT ME! |
static Long |
ZERO
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
Long(int num)
Constructs a long number. |
|
Long(Integer num)
Constructs a long number. |
|
Long(long num)
Constructs an long number. |
|
Long(Long num)
Constructs a long number. |
|
Long(java.lang.String s)
Constructs the long number represented by a string. |
|
| Method Summary | |
|---|---|
Long |
abs()
Returns the abs of this number. |
AbelianGroup.Member |
add(AbelianGroup.Member n)
Returns the addition of this number and another. |
Long |
add(Long n)
Returns the addition of this integer number and another. |
java.lang.Object |
clone()
DOCUMENT ME! |
int |
compareTo(ComparableNumber obj)
Compares two comparable numbers. |
int |
compareTo(Long obj)
Compares two long numbers. |
double |
doubleValue()
DOCUMENT ME! |
boolean |
equals(java.lang.Object obj)
Compares two long numbers for equality. |
float |
floatValue()
DOCUMENT ME! |
Long |
getDistance(ComparableNumber n)
DOCUMENT ME! |
Long |
getNaN()
DOCUMENT ME! |
Long |
getNegativeInfinity()
DOCUMENT ME! |
Long |
getPositiveInfinity()
DOCUMENT ME! |
int |
hashCode()
Returns a hash code for this Long object. |
int |
intValue()
DOCUMENT ME! |
boolean |
isEven()
Returns true if this number is even. |
boolean |
isInfinite()
Returns true if this number is infinite. |
boolean |
isNaN()
Returns true if this number is NaN. |
boolean |
isNegativeInfinity()
DOCUMENT ME! |
boolean |
isOdd()
Returns true if this number is odd. |
boolean |
isPositiveInfinity()
DOCUMENT ME! |
long |
longValue()
DOCUMENT ME! |
Long |
max(Long val)
Returns the max of this number and another, according to compareTo rules. |
Long |
min(Long val)
Returns the min of this number and another, according to compareTo rules. |
Long |
multiply(Long n)
Returns the multiplication of this integer number and another. |
Ring.Member |
multiply(Ring.Member n)
Returns the multiplication of this number and another. |
AbelianGroup.Member |
negate()
Returns the negative of this number. |
Long |
pow(Long n)
Returns this integer number raised to the power of another. |
int |
signum()
Returns the sign of this number. |
AbelianGroup.Member |
subtract(AbelianGroup.Member n)
Returns the subtraction of this number and another. |
Long |
subtract(Long n)
Returns the subtraction of this integer number and another. |
java.lang.String |
toString()
Returns a string representing the value of this long number. |
long |
value()
Returns the long value. |
| Methods inherited from class java.lang.Number |
|---|
byteValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Long ZERO
public static final Long ONE
public static final long MAX_VALUE
public static final long MIN_VALUE
public static final long NEGATIVE_INFINITY
public static final long POSITIVE_INFINITY
public static final java.lang.Class TYPE
| Constructor Detail |
|---|
public Long(long num)
public Long(int num)
public Long(Long num)
public Long(Integer num)
public Long(java.lang.String s)
throws java.lang.NumberFormatException
s - a string representing an integer number.
java.lang.NumberFormatException - if the string does not contain a parsable number.| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - an long number.
public int compareTo(ComparableNumber obj)
throws java.lang.IllegalArgumentException
obj - a number.
this<obj, zero if
this==obj, and a positive value if
this>obj.
java.lang.IllegalArgumentException - DOCUMENT ME!
public int compareTo(Long obj)
throws java.lang.IllegalArgumentException
compareTo in interface java.lang.Comparable<Long>obj - an long number.
this<obj, zero if
this==obj, and a positive value if
this>obj.
java.lang.IllegalArgumentException - DOCUMENT ME!public java.lang.String toString()
toString in class java.lang.Objectpublic long value()
public int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic boolean isEven()
public boolean isOdd()
public Long abs()
public int signum()
public Long min(Long val)
min in class ComparableNumber<Long>val - DOCUMENT ME!
public Long max(Long val)
max in class ComparableNumber<Long>val - DOCUMENT ME!
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isNaN()
isNaN in class ComparableNumber<Long>public boolean isInfinite()
isInfinite in class ComparableNumber<Long>public boolean isNegativeInfinity()
isNegativeInfinity in class ComparableNumber<Long>public boolean isPositiveInfinity()
isPositiveInfinity in class ComparableNumber<Long>public Long getNaN()
getNaN in class ComparableNumber<Long>public Long getNegativeInfinity()
getNegativeInfinity in class ComparableNumber<Long>public Long getPositiveInfinity()
getPositiveInfinity in class ComparableNumber<Long>public Long getDistance(ComparableNumber n)
getDistance in class ComparableNumber<Long>n - DOCUMENT ME!
public AbelianGroup.Member negate()
negate in interface AbelianGroup.Memberpublic AbelianGroup.Member add(AbelianGroup.Member n)
add in interface AbelianGroup.Membern - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!public Long add(Long n)
n - DOCUMENT ME!
public AbelianGroup.Member subtract(AbelianGroup.Member n)
subtract in interface AbelianGroup.Membern - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!public Long subtract(Long n)
n - an integer number.
public Ring.Member multiply(Ring.Member n)
multiply in interface Ring.Membern - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!public Long multiply(Long n)
n - an integer number.
public Long pow(Long n)
n - an integer number.
public java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||