public final class PointerUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.graalvm.word.UnsignedWord |
absoluteDifference(org.graalvm.word.PointerBase pointer1,
org.graalvm.word.PointerBase pointer2)
Return the distance between two Pointers.
|
static boolean |
isAMultiple(org.graalvm.word.PointerBase that,
org.graalvm.word.UnsignedWord multiple)
Check that a Pointer is an even multiple.
|
static <T extends org.graalvm.word.PointerBase> |
max(T x,
T y)
The maximum of two Pointers.
|
static <T extends org.graalvm.word.PointerBase> |
min(T x,
T y)
The minimum of two Pointers.
|
static org.graalvm.word.Pointer |
roundDown(org.graalvm.word.PointerBase that,
org.graalvm.word.UnsignedWord multiple)
Round a Pointer down to the nearest smaller multiple.
|
static org.graalvm.word.Pointer |
roundUp(org.graalvm.word.PointerBase that,
org.graalvm.word.UnsignedWord multiple)
Round a Pointer up to the nearest larger multiple.
|
public static org.graalvm.word.Pointer roundDown(org.graalvm.word.PointerBase that,
org.graalvm.word.UnsignedWord multiple)
that - The Pointer to be rounded up.multiple - The multiple to which that Pointer should be decreased.public static org.graalvm.word.Pointer roundUp(org.graalvm.word.PointerBase that,
org.graalvm.word.UnsignedWord multiple)
that - The Pointer to be rounded up.multiple - The multiple to which that Pointer should be increased.public static boolean isAMultiple(org.graalvm.word.PointerBase that,
org.graalvm.word.UnsignedWord multiple)
that - The Pointer to be verified as a multiple.multiple - The multiple against which the Pointer should be verified.public static org.graalvm.word.UnsignedWord absoluteDifference(org.graalvm.word.PointerBase pointer1,
org.graalvm.word.PointerBase pointer2)
pointer1 - A first Pointer.pointer2 - A second Pointer.public static <T extends org.graalvm.word.PointerBase> T min(T x,
T y)
x - A Pointer.y - Another Pointer.public static <T extends org.graalvm.word.PointerBase> T max(T x,
T y)
x - A Pointer.y - Another Pointer.