@Beta public abstract class Key extends Object implements Comparable<Key>
| Modifier | Constructor and Description |
|---|---|
protected |
Key(long hash) |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
equals(Object obj) |
long |
hash() |
int |
hashCode() |
static Key |
of(long key,
ApplicationId appId)
Creates a key based on the provided long.
|
static Key |
of(String key,
ApplicationId appId)
Creates a key based on the provided string.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompareTopublic long hash()
public static Key of(String key, ApplicationId appId)
Note: Two keys with equal value, but different appId, are not equal.
key - the provided stringappId - application id to associate with this keypublic static Key of(long key, ApplicationId appId)
Note: Two keys with equal value, but different appId, are not equal. Also, "10" and 10L are different.
key - the provided longappId - application id to associate with this key