|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbamboo.util.GuidTools
public class GuidTools
GuidTools.
| Constructor Summary | |
|---|---|
GuidTools()
|
|
| Method Summary | |
|---|---|
static ostore.util.SecureHash |
big_integer_to_secure_hash(BigInteger i)
|
static BigInteger |
calc_dist(BigInteger a,
BigInteger b,
BigInteger mod)
|
protected static void |
check_bpd_and_dv(int bits_per_digit,
int digit_values)
|
static BigInteger |
digits_to_guid(int[] digits,
int bits_per_digit,
int digits_per_guid,
int digit_values)
|
static int[] |
guid_to_digits(BigInteger guid,
int bits_per_digit,
int digits_per_guid,
int digit_values)
Convert a big integer to an array of digits_per_guid
integers, one for each digit of the the big integer. |
static String |
guid_to_string(BigInteger i)
Print only the high-order 8 hexedecimal digits. |
static boolean |
in_range_mod(BigInteger low,
BigInteger high,
BigInteger query,
BigInteger mod)
|
static void |
main(String[] args)
A test harness for digits_to_guid and guid_to_digits. |
static BigInteger |
random_guid(Random rand)
|
static BigInteger |
secure_hash_to_big_integer(ostore.util.SecureHash x)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GuidTools()
| Method Detail |
|---|
public static BigInteger random_guid(Random rand)
public static String guid_to_string(BigInteger i)
public static BigInteger secure_hash_to_big_integer(ostore.util.SecureHash x)
public static ostore.util.SecureHash big_integer_to_secure_hash(BigInteger i)
protected static void check_bpd_and_dv(int bits_per_digit,
int digit_values)
public static int[] guid_to_digits(BigInteger guid,
int bits_per_digit,
int digits_per_guid,
int digit_values)
digits_per_guid
integers, one for each digit of the the big integer. This function was
mostly cribbed from ostore.tapestry.impl.RoutingTable.digits, which I
think was originally written by Jeremy Stribling.
public static BigInteger digits_to_guid(int[] digits,
int bits_per_digit,
int digits_per_guid,
int digit_values)
public static BigInteger calc_dist(BigInteger a,
BigInteger b,
BigInteger mod)
public static boolean in_range_mod(BigInteger low,
BigInteger high,
BigInteger query,
BigInteger mod)
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||