K
- the type of this key.@ImplementationsShouldExtend(value=AbstractKey.class) public interface Key<K extends Key<K>> extends Cloneable
Implementations do not need to be safe for multi-threading.
Modifier and Type | Method and Description |
---|---|
K |
clone()
Returns a deep clone of this safe key.
|
boolean |
equals(Object obj)
Returns
true if and only if this safe key deeply equals the
given object. |
int |
hashCode()
Returns a hash code which is consistent with
equals(Object) . |
void |
reset()
Wipes the secret data from memory and resets all properties to their
initial state.
|
K clone()
boolean equals(Object obj)
true
if and only if this safe key deeply equals the
given object.
A safe key equals another object if and only if the other object
has the same runtime class and all its properties compare deeply equal.int hashCode()
equals(Object)
.
This method is provided for completeness only - you should actually
never use secret keys as hash map keys because of their mutable
properties!void reset()
Copyright © 2012–2018 Schlichtherle IT Services. All rights reserved.