|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vmmagic.unboxed.Word
public final class Word
A generic pointer-sized integer. Can be converted to/from other pointer-sized types, and provides shifting and masking operations.
Constructor Summary | |
---|---|
Word()
|
Method Summary | |
---|---|
Word |
and(Word w2)
Bit-wise and of two words. |
boolean |
EQ(Word w2)
Equality comparison |
static Word |
fromIntSignExtend(int val)
Convert an int to a word. |
static Word |
fromIntZeroExtend(int val)
Convert an int to a word. |
static Word |
fromLong(long val)
Convert a long to a word. |
boolean |
GE(Word w2)
Greater-than or equal comparison |
boolean |
GT(Word w2)
Greater-than comparison |
boolean |
isMax()
Test for zero. |
boolean |
isZero()
Test for zero. |
boolean |
LE(Word w2)
Less-than or equal comparison |
Word |
lsh(int amt)
Left-shift a word. |
boolean |
LT(Word addr2)
Less-than comparison |
static Word |
max()
The maximum representable Word value. |
Word |
minus(Extent w2)
Subtract an extent from a word. |
Word |
minus(Offset w2)
Subtract an offset from a word |
Word |
minus(Word w2)
Subtract two words |
boolean |
NE(Word w2)
Not-equal comparison |
Word |
not()
Bit-wise complement of a word. |
static Word |
one()
The Word constant 1. |
Word |
or(Word w2)
Bit-wise or of two words. |
Word |
plus(Extent w2)
Add an extent to a word |
Word |
plus(Offset w2)
Add an offset to a word |
Word |
plus(Word w2)
Add two words |
Word |
rsha(int amt)
Arithmetic right-shift a word. |
Word |
rshl(int amt)
Logical right-shift a word. |
Address |
toAddress()
Type-cast to an address. |
Extent |
toExtent()
Type-cast to an extent |
int |
toInt()
Type-cast to an int, truncating on 64-bit platforms. |
long |
toLong()
Type-cast to a long, zero-extending on a 32-bit platform. |
Offset |
toOffset()
Type-cast to an offset |
Word |
xor(Word w2)
Bit-wise exclusive or of two words. |
static Word |
zero()
The Word constant 0. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Word()
Method Detail |
---|
public static Word fromIntSignExtend(int val)
val
-
public static Word fromIntZeroExtend(int val)
val
-
public static Word fromLong(long val)
val
-
public static Word zero()
public static Word one()
public static Word max()
public int toInt()
public long toLong()
public Address toAddress()
public Offset toOffset()
public Extent toExtent()
public Word plus(Word w2)
w2
-
public Word plus(Offset w2)
w2
-
public Word plus(Extent w2)
w2
-
public Word minus(Word w2)
w2
-
public Word minus(Offset w2)
w2
-
public Word minus(Extent w2)
w2
-
public boolean isZero()
public boolean isMax()
public boolean LT(Word addr2)
addr2
-
Word
instance is less than addr2
public boolean LE(Word w2)
w2
-
Word
instance is less than or equal to w2
public boolean GT(Word w2)
w2
-
Word
instance is greater than w2
public boolean GE(Word w2)
w2
-
Word
instance is greater than or equal to w2
public boolean EQ(Word w2)
w2
-
Word
instance is equal to w2
public boolean NE(Word w2)
w2
-
Word
instance is not equal to w2
public Word and(Word w2)
w2
-
public Word or(Word w2)
w2
-
public Word not()
public Word xor(Word w2)
w2
-
public Word lsh(int amt)
amt
- the amount to shift by
public Word rshl(int amt)
lsh(int)
.
amt
- the amount to shift by
public Word rsha(int amt)
lsh(int)
.
Arithmetic right-shift a word. Equivalent to the integer >>
operator
amt
- the amount to shift by
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |