|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
com.kenai.jaffl.NativeLong
public final class NativeLong
Represents a C long.
In C, a long can be either 32 bits or 64bits, depending on the platform.
Replace any function parameters which are long in the C definition with a NativeLong.
Field Summary | |
---|---|
static long |
MASK
|
static int |
SHIFT
|
static int |
SIZE
|
Constructor Summary | |
---|---|
NativeLong(long value)
Creates a new NativeLong instance with the supplied value. |
Method Summary | |
---|---|
int |
compareTo(NativeLong other)
Compares two NativeLong instances numerically. |
double |
doubleValue()
Returns an double representation of this NativeLong. |
boolean |
equals(java.lang.Object obj)
Compares this NativeLong to another NativeLong. |
float |
floatValue()
Returns an float representation of this NativeLong. |
int |
hashCode()
Gets a hash code for this NativeLong . |
int |
intValue()
Returns an integer representation of this NativeLong. |
long |
longValue()
Returns an long representation of this NativeLong. |
java.lang.String |
toString()
Returns a string representation of this NativeLong. |
static NativeLong |
valueOf(int value)
Returns a NativeLong instance representing the specified int value |
static NativeLong |
valueOf(long value)
Returns a NativeLong instance representing the specified long value |
Methods inherited from class java.lang.Number |
---|
byteValue, shortValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SIZE
public static final int SHIFT
public static final long MASK
Constructor Detail |
---|
public NativeLong(long value)
value
- a long or integer.Method Detail |
---|
public final int intValue()
intValue
in class java.lang.Number
public final long longValue()
long
representation of this NativeLong.
longValue
in class java.lang.Number
long
value for this NativeLong.public final float floatValue()
float
representation of this NativeLong.
floatValue
in class java.lang.Number
float
value for this NativeLong.public final double doubleValue()
double
representation of this NativeLong.
doubleValue
in class java.lang.Number
double
value for this NativeLong.public final int hashCode()
NativeLong
.
hashCode
in class java.lang.Object
NativeLong
.public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the other NativeLong to compare to.
true
if this NativeLong is equal to the other
NativeLong, else false.public java.lang.String toString()
toString
in class java.lang.Object
public final int compareTo(NativeLong other)
NativeLong
instances numerically.
compareTo
in interface java.lang.Comparable<NativeLong>
other
- the other NativeLong to compare to.
0
if other
is equal to this instance, -1 if this
instance is numerically less than other
or 1 if this instance is
numerically greater than other
.public static final NativeLong valueOf(long value)
value
- a long value
public static final NativeLong valueOf(int value)
value
- a 32bit integer value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |