public final class Key extends Object implements Comparable<Key>, Serializable
Modifier and Type | Field and Description |
---|---|
private static int |
BIN |
private static int |
DEC |
private static int |
HEX |
private String |
key |
static int |
LENGTH |
Constructor and Description |
---|
Key(String key)
Overloaded constructor for Key (toHash default to True)
the key will be hashed
|
Key(String key,
Boolean toHash)
Constructor for Key
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Key o) |
boolean |
equals(Object obj) |
String |
getKey() |
Key |
sum(BigInteger integer)
Returns this.key + integer
|
Key |
sum(Key b)
Returns this.key + (Key) b
|
static Key |
sum(Key a,
BigInteger integer)
Returns (Key) a + integer
|
static Key |
sum(Key a,
Key b)
Returns (Key) a + (Key) b
|
Key |
sumPow(int pow)
Returns this.key + 2^pow
|
Key |
sumPowDivided(int pow,
int divisor)
Returns this.key + 2^pow/divisor
|
String |
toString() |
public static final int LENGTH
private final String key
private static final int HEX
private static final int DEC
private static final int BIN
public Key(String key)
key
- |public String getKey()
public int compareTo(Key o)
compareTo
in interface Comparable<Key>
public Key sumPow(int pow)
pow
- |public Key sumPowDivided(int pow, int divisor)
pow
- |divisor
- |public Key sum(BigInteger integer)
integer
- |public static Key sum(Key a, Key b)
a
- |b
- |public static Key sum(Key a, BigInteger integer)
a
- |integer
- |Copyright © 2018. All rights reserved.