com.kenai.jaffl

Class Address

public class Address extends Number implements Comparable<Address>

Represents a native memory address.
Field Summary
protected longaddress
static longMASK
static intSHIFT
static intSIZE
Constructor Summary
Address(long address)
Creates a new address representation.
Address(Address address)
Creates a new address representation.
Method Summary
intcompareTo(Address other)
Compares two {@code Address} instances numerically.
booleanisNull()
Tests if this Address is equivalent to C NULL
longnativeAddress()
Returns the native value of this address.
static AddressvalueOf(long address)

Field Detail

address

protected final long address

MASK

public static final long MASK

SHIFT

public static final int SHIFT

SIZE

public static final int SIZE

Constructor Detail

Address

public Address(long address)
Creates a new address representation.

Parameters: address the native address.

Address

public Address(Address address)
Creates a new address representation.

Parameters: address the native address.

Method Detail

compareTo

public final int compareTo(Address other)
Compares two {@code Address} instances numerically.

Parameters: other the other Address to compare to.

Returns: {@code 0} if {@code other} is equal to this instance, -1 if this instance is numerically less than {@code other} or 1 if this instance is numerically greater than {@code other}.

isNull

public final boolean isNull()
Tests if this Address is equivalent to C NULL

Returns: true if the address is 0

nativeAddress

public final long nativeAddress()
Returns the native value of this address.

Returns: an {@code long} value representing the native value of this address.

valueOf

public static final Address valueOf(long address)