public class KeyState extends Object implements Comparable, Serializable
Key object suitable
for use as the key of a Map.| Modifier and Type | Field and Description |
|---|---|
static KeyState |
LEFT_GUARD_KEYSTATE |
static KeyState |
RIGHT_GUARD_KEYSTATE |
static long |
serialVersionUID |
| Constructor and Description |
|---|
KeyState(byte[] data) |
KeyState(Key key)
Construct an immutable
KeyState by copying the relevant
state information from a Key. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object obj)
Implement
Comparable in such a way that Key and
KeyState can be used interchangeably as map keys. |
void |
copyTo(Key key)
Copy the content of this
KeyState to the supplied
Key. |
boolean |
equals(Object obj)
Implement
equals in such a way that Key and
KeyState can be used interchangeably as map keys. |
byte[] |
getBytes() |
int |
hashCode()
Compute the hash code for this
KeyState. |
String |
toString() |
public static final long serialVersionUID
public static final KeyState LEFT_GUARD_KEYSTATE
public static final KeyState RIGHT_GUARD_KEYSTATE
public KeyState(Key key)
KeyState by copying the relevant
state information from a Key. The hashCode and
equals methods of Key and KeyState
are compatible so that either a Key or a
KeyState may be used as a map key.key - The Key from which the state is copied.public KeyState(byte[] data)
public void copyTo(Key key)
KeyState to the supplied
Key.key - The key to which content should be copied.public int hashCode()
KeyState. The hashCode is the
same as for the equivalent Key, that is the Key
from which this KeyState was constructed prior to any
subsequent modifications.public boolean equals(Object obj)
equals in such a way that Key and
KeyState can be used interchangeably as map keys.public int compareTo(Object obj)
Comparable in such a way that Key and
KeyState can be used interchangeably as map keys.compareTo in interface ComparableKeyState with a supplied KeyState or
Key. The result is negative if this key value
preceeds, positive if this key value follows, or zero if this key
value is equal to the supplied key value.ClassCastException - if the supplied object is neither a Key nor a
KeyStatepublic byte[] getBytes()
Copyright © 2025 Open Identity Platform Community. All rights reserved.